Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
nodejs-instagram-api
Advanced tools
This Node.js script provides automation for interacting with Instagram using the Instagram Private API. It covers login, profile information retrieval, and fetching user feed data.
This Node.js script provides automation for interacting with Instagram using the NodeJS Instagram API. It covers login, profile information retrieval, and fetching user feed data.
Analysis the Instagram client-side password encryption by Reverse Enginering
Install npm package to your local machine.
npm i nodejs-instagram-api
Customize the script according to your needs and execute it to automate various Instagram interactions.
const api = require('nodejs-instagram-api');
(async () => {
var username = 'your-username';
var password = 'your-password';
const instagramLogin = new api.InstagramLogin(proxyOptions=null, username, password);
const loginData = await instagramLogin.login();
})();
{
cookie: 'csrftoken=XXXXX; rur="XXXXX"; mid=XXXXX; ds_user_id=XXXXX; sessionid=XXXXX',
username: 'your-username',
password: 'your-password',
x_ig_app_id: 'XXXXX',
x_csrftoken: 'XXXXX',
ig_did: 'XXXXX',
x_instagram_ajax: 'XXXXX'
}
(async () => {
const webProfileInfo = new api.WebProfileInfo(loginData, proxyOptions=null, "target-username");
const profileData = await webProfileInfo.getProfileData();
})();
(async () => {
const userFeed = new api.UserFeed(loginData, proxyOptions=null, "target-username");
const userFeedData = await userFeed.getUserFeedData();
})();
(async () => {
const proxyOptions = {
host: 'proxy-hostname',
port: 80,
username: 'proxy-username',
password: 'proxy-password'
};
var username = 'your-username';
var password = 'your-password';
const instagramLogin = new api.InstagramLogin(proxyOptions, username, password);
const loginData = await instagramLogin.login();
})();
(async () => {
// Extract the target user's ID from the profile data
// Create a new instance of the FriendShip class with relevant parameters
const webProfileInfo = new api.WebProfileInfo(loginData, proxyOptions=null, "target-username");
const profileData = await webProfileInfo.getProfileData();
const targetUser = profileData.data.user.id;
const friendShip = new api.FriendShip(loginData, null, targetUser, secTimeout=5, pageSize=200);
// Use asynchronous calls to get the followers and following lists
var followers = await friendShip.getFollowers();
var following = await friendShip.getFollowing();
})();
FAQs
This Node.js script provides automation for interacting with Instagram using the Instagram Private API. It covers login, profile information retrieval, and fetching user feed data.
The npm package nodejs-instagram-api receives a total of 1 weekly downloads. As such, nodejs-instagram-api popularity was classified as not popular.
We found that nodejs-instagram-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.