hikerapi
v1.7.11
Published
Fastest Instagram API client for Node.js. No login required.
Maintainers
Readme
Hikerapi client for Node.js
Fastest Instagram API. No login required.
Installation
npm install hikerapiUsage
Create a token at https://hikerapi.com/tokens and copy "Access key"
const { Client } = require('hikerapi');
const cl = new Client({ token: '<ACCESS_KEY>' });
async function main() {
// Get user info
const user = await cl.userByUsernameV2('instagram');
console.log(user);
// Get user medias
const medias = await cl.userMediasChunkV1(user.response.pk);
console.log(medias);
// Search users
const users = await cl.searchUsersV1('nasa');
console.log(users);
}
main().catch((err) => {
console.error(err);
process.exit(1);
});Or set the environment variable:
export HIKERAPI_TOKEN=<ACCESS_KEY>const { Client } = require('hikerapi');
const cl = new Client(); // reads from HIKERAPI_TOKENAPI
106 endpoints available: user info, medias, stories, highlights, followers, following, comments, likers, search, hashtags, locations, reels, and more.
Full API docs: https://hikerapi.com/docs
Run tests
npm test
HIKERAPI_TOKEN=<token> npm run test:live
HIKERAPI_TOKEN=<token> npm run test:allnpm test always runs offline unit tests and runs live smoke tests when HIKERAPI_TOKEN is set.
Requirements
Node.js 18+ (uses native fetch)
License
MIT
