All Projects → dilame → Instagram Private Api

dilame / Instagram Private Api

Licence: mit
NodeJS Instagram private API SDK. Written in TypeScript.

Programming Languages

typescript
32286 projects

Labels

Projects that are alternatives of or similar to Instagram Private Api

Pastel
🎨 Gradient animation effect like Instagram
Stars: ✭ 3,355 (-22.34%)
Mutual labels:  instagram
Instagramcrawler
A non API python program to crawl public photos, posts or followers
Stars: ✭ 349 (-91.92%)
Mutual labels:  instagram
Instagram Data Scraper
Instagram Data Scraper, Instagram Web Scraper, Instagram Super Scraper is a PHP script which takes @user-name or #keywords as input and returns all information related to user or hash-tags e.g. likes, comments, post count, images, likes on images etc... You can search @account information and #hash-tag simultaneously by using space separated words in search box jQuery is using to build the Awesome View, to handle each and every request separately. I hope you like this small chunk of code All code is well commented to understand the flow and functionality, if I missed something or any improvement/suggestion you have, kindly let me know..
Stars: ✭ 371 (-91.41%)
Mutual labels:  instagram
Oauth
🔗 OAuth 2.0 implementation for various providers in one place.
Stars: ✭ 336 (-92.22%)
Mutual labels:  instagram
Pyinstalive
Python script to download Instagram livestreams and replays.
Stars: ✭ 336 (-92.22%)
Mutual labels:  instagram
Reactnative Animation Challenges
A series of animation challenges in React Native.
Stars: ✭ 352 (-91.85%)
Mutual labels:  instagram
Instantgram
☁️ A bookmarklet for download photos in Instagram
Stars: ✭ 322 (-92.55%)
Mutual labels:  instagram
Socialphish
The most complete Phishing Tool, with 32 templates +1 customizable
Stars: ✭ 378 (-91.25%)
Mutual labels:  instagram
Privacy Redirect
A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.
Stars: ✭ 342 (-92.08%)
Mutual labels:  instagram
Instagramlive Php
A PHP script that allows for you to go live on Instagram with any streaming program that supports RTMP!
Stars: ✭ 362 (-91.62%)
Mutual labels:  instagram
Instagram Java Scraper
Instagram Java Scraper. Get account information, photos, videos and comments.
Stars: ✭ 335 (-92.25%)
Mutual labels:  instagram
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (-15.25%)
Mutual labels:  instagram
Vue Fullstack Graphql
Starter projects for fullstack applications based on Vue.js & GraphQL.
Stars: ✭ 352 (-91.85%)
Mutual labels:  instagram
Insomniac
Instagram bot for automated Instagram interaction using Android device via ADB
Stars: ✭ 324 (-92.5%)
Mutual labels:  instagram
Segmentedprogressbar
Snapchat / Instagram Stories like progress indicator
Stars: ✭ 376 (-91.3%)
Mutual labels:  instagram
Social Media Profiles Regexs
📇 Extract social media profiles and more with regular expressions
Stars: ✭ 324 (-92.5%)
Mutual labels:  instagram
Go Instabot
Automatically follow, like, and comment on instagram
Stars: ✭ 345 (-92.01%)
Mutual labels:  instagram
Jinstagram
A Java library for the Instagram API.
Stars: ✭ 382 (-91.16%)
Mutual labels:  instagram
Osi.ig
Information Gathering Instagram.
Stars: ✭ 377 (-91.27%)
Mutual labels:  instagram
Jetinstagram
JetInstagram is an Instagram UI clone app built with Jetpack Compose.
Stars: ✭ 350 (-91.9%)
Mutual labels:  instagram

NodeJS Instagram private API client

logo

Telegram Chat npm npm Join the chat at https://gitter.im/instagram-private-api/Lobby


Next major version

Me and Nerix are ready to announce the next 2.x.x version of this library. It has extended feature list. It's a big release. We have significantly expanded the functionality and capabilities. The library turned into a monorepository and now it's a set of libraries, connected in an ecosystem. It consists of

  • Android API
  • Web API
  • FBNS, Realtime

We've done some work on design decisions. We simplified the state management process. Now you can easily make a snapshot of account state, save it in a persistent storage and then restore a 1-to-1 copy with just 1 function call. With new realtime features you can listen for new direct messages, notifications and any other events.

The new version is hosted in private repository. Access is paid. Members get basic support for installation, configuration, and usage. We also will try to react on your feature requests.

You can contact me in telegram or email for details.

Table of Contents

Install

From npm

npm install instagram-private-api

From github

npm install github:dilame/instagram-private-api

Support us

If you find this library useful for you, you can support it by donating any amount

BTC: 1Dqnz9QuswAvD3t7Jsw7LhwprR6HAWprW6

Examples

You can find usage examples here

Note for JavaScript users: As of Node v.13.5.0, there isn't support for ESModules and the 'import'-syntax. So you have to read the imports in the examples like this:

import { A } from 'b' const { A } = require('b')

import { IgApiClient } from './index';
import { sample } from 'lodash';
const ig = new IgApiClient();
// You must generate device id's before login.
// Id's generated based on seed
// So if you pass the same value as first argument - the same id's are generated every time
ig.state.generateDevice(process.env.IG_USERNAME);
// Optionally you can setup proxy url
ig.state.proxyUrl = process.env.IG_PROXY;
(async () => {
  // Execute all requests prior to authorization in the real Android application
  // Not required but recommended
  await ig.simulate.preLoginFlow();
  const loggedInUser = await ig.account.login(process.env.IG_USERNAME, process.env.IG_PASSWORD);
  // The same as preLoginFlow()
  // Optionally wrap it to process.nextTick so we dont need to wait ending of this bunch of requests
  process.nextTick(async () => await ig.simulate.postLoginFlow());
  // Create UserFeed instance to get loggedInUser's posts
  const userFeed = ig.feed.user(loggedInUser.pk);
  const myPostsFirstPage = await userFeed.items();
  // All the feeds are auto-paginated, so you just need to call .items() sequentially to get next page
  const myPostsSecondPage = await userFeed.items();
  await ig.media.like({
    // Like our first post from first page or first post from second page randomly
    mediaId: sample([myPostsFirstPage[0].id, myPostsSecondPage[0].id]),
    moduleInfo: {
      module_name: 'profile',
      user_id: loggedInUser.pk,
      username: loggedInUser.username,
    },
    d: sample([0, 1]),
  });
})();

Basic concepts

Feeds

Feed allows you to get data. Every feed is accessible via ig.feed.feedName. See nice example and learn how to work with library feeds.

Available feeds key list:

accountFollowers, accountFollowing, news, discover, pendingFriendships, blockedUsers, directInbox, directPending, directThread, user, tag, location, mediaComments, reelsMedia, reelsTray, timeline, musicTrending, musicSearch, musicGenre, musicMood, usertags, saved

Most of the feeds requires initialization parameter, like user pk. Check autogenerated docs, every feed doc link starts with feeds/ and contains constructor with argument if needed.

Repositories

Repositories implements low-level atomic operations. Any repository method must make at most one api-request. There is repository listing below, so you can get information about methods of each repository from our autogenerated docs.

Keys is a little hints, with it you will be able to get access to repository via ig.key.

Key Repository class documentation
account AccountRepository
attribution AttributionRepository
challenge ChallengeRepository
consent ConsentRepository
creatives CreativesRepository
direct DirectRepository
directThread DirectThreadRepository
discover DiscoverRepository
fbsearch FbsearchRepository
friendship FriendshipRepository
launcher LauncherRepository
linkedAccount LinkedAccountRepository
live LiveRepository
location LocationRepository
locationSearch LocationSearch
loom LoomRepository
media MediaRepository
music MusicRepository
news NewsRepository
qe QeRepository
qp QpRepository
tag TagRepository
upload UploadRepository
user UserRepository
zr ZrRepository

Services

Services will help you to maintain some actions without calling a couple repositority methods or perform complex things like pre and postlogin flow simulations or photo/video publishing.

Key Service class documentation
publish PublishService
search SearchService
simulate SimulateService
story StoryService

Debugging

In order to get debug infos provided by the library, you can enable debugging. The prefix for this library is ig. To get all debug logs (recommended) set the namespace to ig:*.

Node

In node you only have to set the environment variable DEBUG to the desired namespace. Further information

Browser

In the browser you have to set localStorage.debug to the desired namespace. Further information

Contribution

If you need features that is not implemented - feel free to implement and create PRs!

Plus we need some documentation, so if you are good in it - you are welcome.

Setting up your environment is described here.

Useful links

instagram-id-to-url-segment - convert the image url fragment to the media ID

Special thanks

  • Richard Hutta, original author of this library. Thanks to him for starting it.

Thanks to contributors

  • Nerixyz, for writing a huge amount of code for this library.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].