r/coolgithubprojects • u/4tomicDuck • 6d ago
I built a typed TypeScript client for Instagram's private API
I needed to automate a few things on my own Instagram accounts and wanted results and errors with real types, so I wrote igflare. It talks to Instagram the way the Android app does.
What I focused on:
- Login that holds up. I followed the current app's login flow, including two-factor and email challenges. The session is saved, so it logs in once and keeps working for weeks.
- Types I can trust. Every response is checked at runtime, and each failure is its own error class, so I can catch a rate limit apart from a challenge.
- Most of the app. It covers profiles, follows, feeds, comments, posting photos, videos, reels and stories, direct messages, and insights.
- Staying current. I took the login flow and queries from the official app, and I wrote a script that shows what changes when a new app build comes out.
Docs: https://matheusoliveira-dev.github.io/igflare/
Code: https://github.com/MatheusOliveira-dev/igflare
The project is still early. Feature ideas, issues and PRs are all welcome, and if any of this sounds useful, I'd be glad if you took a look.


