HikerAPI
A pay-per-request API for Instagram data: profiles, posts, followers, hashtags, stories, without touching the official platform APIs.
The code here is the easy part: instagrapi and friends are open source, and an agent can wrap them in a REST API in an afternoon. What you cannot one-shot is a farm of aged accounts, residential proxy rotation, fingerprint churn, and a team that patches the client every time Instagram quietly changes an internal endpoint or ships a new challenge flow. Your single account behind your home IP will hit rate limits, then checkpoints, then a permanent ban, usually in that order and usually on the day you need data. A personal build is fine for pulling a few hundred profiles once. It is not fine for anything that has to keep working next month.
Build verification: not recorded. How we judge buildability
What you give up
- An account pool that absorbs bans so yours does not
- Residential proxy rotation and device fingerprint management
- Same-day fixes when the platform changes internal endpoints
- Real throughput: concurrent requests instead of one polite call every few seconds
- Coverage beyond Instagram, including TikTok and other networks
Why people still pay
Because scraping Instagram at any real volume is a maintenance job, not a coding job. The client library is free, but the accounts get burned, the IPs get blocked, the login flow adds a new challenge, and suddenly your pipeline is dead and you are the one on call. Paying per request outsources the entire ban surface to someone who has already amortized it across thousands of customers, and it converts an unpredictable ops liability into a line item. The moment your use case involves more than a few thousand lookups or needs to run unattended, the math flips hard against DIY.
Your build guide
The stack, security requirements, and agent rules for a focused replacement.
Before you start
- A throwaway Instagram account you are willing to lose
- A residential or mobile proxy, datacenter IPs get flagged fast
- Python 3.11 and patience for session challenge prompts
- Acceptance that any of this can break without warning
Use these project rules and optional skill references alongside the prompt. Review each skill before adding it to your agent; the AGENTS.md export includes the same guidance.
Project rule, data: Persist the instagrapi session to session.json and reuse it on boot. Only re-login if the session is dead.
Project rule, behavior: Goal: a small REST API on localhost that returns Instagram profile, media, and follower data for personal research, with heavy caching so I never fetch the same thing twice.
Project rule, recovery: On login challenge, 429, or ChallengeRequired, return HTTP 503 with a clear message telling me to log in manually in a browser on the same proxy. Do not retry in a loop.
Implementation plan
Phase 1, architecture and data
Build a local, single-user Instagram data service in an empty folder. Stack: Python 3.11, FastAPI, uvicorn, instagrapi, SQLite via sqlite3 (no ORM), httpx only if needed. Persist the instagrapi session to session.json and reuse it on boot. Only re-login if the session is dead.
Phase 2, implement
Goal: a small REST API on localhost that returns Instagram profile, media, and follower data for personal research, with heavy caching so I never fetch the same thing twice.
Phase 3, implement
GET /cache/stats : row counts and cache hit counters.
Phase 4, review and output
Deliverables: main.py, db.py, client.py, .env.example, requirements.txt, and a README that says plainly that this account will probably get banned and that the TTLs and sleeps are the only thing keeping it alive.
Phase 5, recovery and acceptance
On login challenge, 429, or ChallengeRequired, return HTTP 503 with a clear message telling me to log in manually in a browser on the same proxy. Do not retry in a loop. Verify this invariant with a saved fixture: Invalid input must return a typed error; the same fixture must produce the documented output after restart. State the practical limit: An account pool that absorbs bans so yours does not.
Build a local, single-user Instagram data service in an empty folder. Stack: Python 3.11, FastAPI, uvicorn, instagrapi, SQLite via sqlite3 (no ORM), httpx only if needed.
Goal: a small REST API on localhost that returns Instagram profile, media, and follower data for personal research, with heavy caching so I never fetch the same thing twice.
Endpoints:
- GET /user/{username} : profile info (id, full name, bio, counts, is_private, profile pic url)
- GET /user/{username}/media?limit=N : recent posts (id, code, caption, like/comment counts, taken_at, media urls)
- GET /user/{username}/followers?limit=N : follower list, capped at 200 per call
- GET /hashtag/{tag}/top : top media for a hashtag
- GET /cache/stats : row counts and cache hit counters
Rules:
- Credentials and proxy come from .env: IG_USERNAME, IG_PASSWORD, IG_PROXY. Ship a .env.example, never commit secrets.
- Persist the instagrapi session to session.json and reuse it on boot. Only re-login if the session is dead.
- One global request queue with a single worker. Sleep a random 4 to 12 seconds between platform calls. No concurrency, ever.
- Cache every response in SQLite keyed by endpoint plus params, with a fetched_at timestamp and a TTL of 24 hours for profiles and 6 hours for media. Serve cache on hit and mark the response with a "cached": true field.
- On login challenge, 429, or ChallengeRequired, return HTTP 503 with a clear message telling me to log in manually in a browser on the same proxy. Do not retry in a loop.
- Log every platform call to a requests table so I can see exactly how much I hammered them.
Out of scope: no posting, liking, following, or DMs. No web UI beyond FastAPI's built-in docs. No account rotation, no proxy pool, no cloud deploy, no telemetry.
Deliverables: main.py, db.py, client.py, .env.example, requirements.txt, and a README that says plainly that this account will probably get banned and that the TTLs and sleeps are the only thing keeping it alive.$ open in your agent (prompt prefilled, you press enter), copy the prompt or copy AGENTS.md · generated from this app's build plan
prompt copied. want to know what dies next week?
new verdicts + top votes, weekly. free. one-click out.
No prior-art project is listed yet. Compare the scoped build with the paid product before choosing.
Questions about HikerAPI
Can you build your own HikerAPI with AI?
A full replacement is not the recommended project. The code here is the easy part: instagrapi and friends are open source, and an agent can wrap them in a REST API in an afternoon. What you cannot one-shot is a farm of aged accounts, residential proxy rotation, fingerprint churn, and a team that patches the client every time Instagram quietly changes an internal endpoint or ships a new challenge flow. Your single account behind your home IP will hit rate limits, then checkpoints, then a permanent ban, usually in that order and usually on the day you need data. A personal build is fine for pulling a few hundred profiles once. It is not fine for anything that has to keep working next month.
What does the HikerAPI build prompt cover?
The prompt starts with this scope: A local FastAPI service that wraps instagrapi with one logged-in session, a proxy, aggressive request pacing, and a SQLite cache so you never fetch the same profile twice. Full-product capabilities excluded from the comparison include: An account pool that absorbs bans so yours does not; Residential proxy rotation and device fingerprint management; Same-day fixes when the platform changes internal endpoints. Follow the implementation plan and its prerequisites before expanding the build.
How do I use the prompt, AGENTS.md and agent skills?
Start with the HikerAPI prerequisites and stack, then copy the prompt into your coding agent. Save the project rules as AGENTS.md in the project root. Linked skills are optional packages or source instructions for specific tasks; review their current contents and install only those matching the chosen stack. A skill does not supply API credentials or verify the finished app.
How long will this HikerAPI project take?
The catalogue estimate is a weekend for the limited scope. Setup, integration approvals, debugging, deployment and ongoing maintenance can add time. This is an estimate, not a delivery guarantee.
What would I give up by replacing HikerAPI?
An account pool that absorbs bans so yours does not; Residential proxy rotation and device fingerprint management; Same-day fixes when the platform changes internal endpoints; Real throughput: concurrent requests instead of one polite call every few seconds; Coverage beyond Instagram, including TikTok and other networks. Because scraping Instagram at any real volume is a maintenance job, not a coding job. The client library is free, but the accounts get burned, the IPs get blocked, the login flow adds a new challenge, and suddenly your pipeline is dead and you are the one on call. Paying per request outsources the entire ban surface to someone who has already amortized it across thousands of customers, and it converts an unpredictable ops liability into a line item. The moment your use case involves more than a few thousand lookups or needs to run unattended, the math flips hard against DIY.
What can I use instead of building HikerAPI?
No alternative is listed in this entry yet. That is a gap in this catalogue, not proof that no suitable product exists. Compare the paid product and the proposed scope before committing to a build.