It was the last working day of the month, the day I send my clients their Instagram reports. I had a coffee, a half-finished report and a script that had worked fine the previous month. Then it died on a login challenge, and I spent the next hour re-authenticating an account instead of sending anything. I'm a freelance social media manager who writes just enough Python to get into trouble, and that hour was when I started asking whether I should be maintaining this at all.

The job

Once a month I pull stats for each client's account (followers, recent posts, how the posts did) and turn them into a report. The volume is small, but the deadline is real and the numbers have to be right, because clients read them.

instagrapi: what it's good at

I used instagrapi first, and I'd still recommend it in the right situation. It's free, it's well maintained, and it gives you a lot of control. For a hobby project or a one-off script it's hard to beat.

My problems were all around the login:

  • It works through a logged-in account, so I had to manage sessions.
  • When Instagram flagged the session, I got challenges and, once, a locked account.
  • I never felt safe using an account that mattered for client work.

None of that is the library's fault. It's how that approach works.

The hosted API route

I moved the collection step to HikerAPI, a hosted REST API. You send your key in an x-access-key header and call an endpoint. It's pay-per-request, starting at about $0.001 per request, and there are 100 free requests to try it. I used those to compare the output with what I see in the app before changing anything.

Here is the call for one profile:

import requests headers = {"x-access-key": "YOUR_KEY"} r = requests.get("https://api.hikerapi.com/v2/user/by/username", params={"username": "nike"}, headers=headers) print(r.json()) 

That's the whole login flow: there isn't one. My report script went from managing sessions and retries to looping over a list of usernames and saving each response to a file, so a failed run only re-fetches what's missing.

Side by side

instagrapi Hosted API
Upfront cost Free Free tier to test
Ongoing cost Accounts, maybe proxies, your time Per request
Login/session handling You Provider
Ban or lock risk On your account Not on your accounts
Control over how data is fetched High Low
Setup effort Medium Low
Dependency The library and Instagram The provider's uptime

When I'd pick each

Use instagrapi if:

  • you want full control and are happy to maintain sessions,
  • you're doing a hobby project or a one-off,
  • you have throwaway accounts and proxies already.

Use a hosted API if:

  • you have a deadline (mine is monthly) and can't afford a broken run,
  • you don't want a real account tied to the job,
  • your volume is low enough that per-request pricing beats paying for idle infrastructure.

What to watch for

  • Cost at scale. Per-request pricing is cheap for a few clients. If you pull a very large number of records, do the math first.
  • Correctness. Spot-check results against the app before sending a report to a client. That applies to any source, including your own scraper.
  • Dependency. If the provider goes down, so does your pipeline. I keep the saved responses from each run as a fallback.

Where I ended up

For my use, small and deadline-driven, the hosted API removed the part that kept breaking. If you're a developer who enjoys controlling every layer, or you run a lot of accounts yourself, instagrapi may still be the better fit.

Disclosure: the provider offers free credits for write-ups like this one, so weigh my opinion accordingly. The comparison above comes from what I actually ran into.

What's your setup for recurring Instagram reports? Still running your own, or have you handed it off?