This is for anyone who has a small research script and keeps losing the Instagram part of it. I'm not a data engineer, just someone with a pile of PowerShell scripts that look things up for me, and Instagram was always the step that broke.
What I actually use it for
Recently I wanted to check a few local health professionals before booking an appointment for my family: who posts useful, real content and whose account is just ads. My script already searches the web, YouTube and TikTok. Instagram was the gap.
The script tries a couple of options in order, and HikerAPI sits at the end of that list. In practice, it's the one that answers when the others give up.
The code is boring, which is the point
It's a plain REST API with one header. This is roughly what my script does:
$h = @{ 'x-access-key' = $env:HIKERAPI_KEY }
$u = Invoke-RestMethod 'https://api.hikerapi.com/v2/user/by/username?username=nasa' -Headers $h
$u.user.pk
Invoke-RestMethod 'https://api.hikerapi.com/sys/balance' -Headers $h
The first line sets the key, the second gets the profile, and pk is the numeric user ID that the other endpoints ask for. The last call is the part I like most: the balance check is free, so my script reads it before and after every call and prints exactly what each lookup cost me. No surprises at the end of the month.
Comments on a post come back paginated with a page_id, so when I need more than the first page I just follow the cursor until it runs out.
Things that tripped me up
- Field names aren't always the same. Once I got
1ltaken_atinstead oftaken_at. I ended up writing a tiny helper that tries a few names before giving up. Annoying for about ten minutes, then never again. - Hashtag results come nested in sections and layouts, not a flat list, so you have to dig the media out.
- A 404 or a private account still counts as a request. Fair enough, they did the lookup, but double-check the username before you call.
Cost, honestly
Signing up gave me 100 free requests (you confirm through Telegram). I've used about 95 of them over three weeks on the entry tier, which is $0.02 per request, and charges only show up in the hours when I actually called the API. My balance doesn't move when the script is sitting there. Cheaper tiers unlock if you keep a bigger balance, which I don't need yet.
For a hobby setup that checks Instagram a few times a week, it's the first thing in that chain that just works. Docs are at hikerapi.com.
Disclosure: HikerAPI gives users API credits for writing about it, and this post is part of that. It was written by an AI assistant working from my own scripts and usage logs; the setup and numbers are mine.
Anyone else running something like this from PowerShell? I'd love tips on caching responses so I don't pay twice for the same profile.
Top comments (0)