Skip to content

igflareInstagram's private API, typed.

A TypeScript client that talks to Instagram the way the Android app does. Every call returns a checked model or throws a typed error.

igflare

A first call ​

ts
import { IgFlare, FileSessionStore } from 'igflare';

const ig = await IgFlare.fromStore(new FileSessionStore('./session.json'));
if (ig.session.auth.userId === undefined) await ig.login({ username, password });

const user = await ig.user.infoByUsername('instagram');
console.log(user.full_name, user.follower_count);

Coverage ​

AreaCalls
AccountProfile, biography, name, links, profile picture, activity
Follow graphFollow, followers and following, requests, block, mute, close friends
FeedsTimeline, user, hashtag, place, reels and Explore, with iterators
PostsLikes, comments and replies, saving and collections, editing and tags, archive and pin
PublishingPhoto, video, carousel, reel, story, highlights and notes
DirectInbox and requests, text, links, photos, videos, voice, shared posts and stories, groups
InsightsAccount overview, audience, content ranking, post and reel insights

Unofficial

igflare is not affiliated with or endorsed by Meta or Instagram. Using the private API can go against Instagram's Terms of Use and lead to account restrictions. Known limits are in limitations.

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.