DEV Community

Ahmad Alzuhlof
Ahmad Alzuhlof

Posted on

Getting shares, reposts and saves for Instagram posts you don't own

I run an influencer marketing agency in Kuwait. We build campaigns with creators, and at the end the client wants to know what their money bought. For the last few months I've been building our own internal tool that collects each campaign post's numbers and shows the client a live page instead of a slide deck full of screenshots.

The hard part was never views. It was shares, saves and reposts.

Instagram gives those three to the account owner, inside Insights. We are not the owner — the creator is. And creators are not going to connect their Instagram to an agency's internal tool, so an official OAuth integration was never realistic for us. Asking for a screenshot of every reel doesn't scale past a handful of posts, and a screenshot isn't a number you can put in a report that updates by itself.

What we tried first. Meta's Business Discovery API is free and official, and it works for business and creator accounts: you get plays, likes and comments for recent posts. No shares, no saves, no reposts. We still use it, because free and official beats everything else when it covers what you need.

Then we tried a general scraping API that we already pay for, and that we still use for profile data and TikTok. It gives Instagram plays, likes and comments too — but not shares. I emailed their support to be sure I wasn't missing an endpoint, and their founder replied that they don't return Instagram share counts, and suggested we look at HikerAPI.

That turned out to be right. One request against a post's shortcode returns the play count, likes and comments, plus the reshare count, the repost count and the save count. No Instagram login or cookies involved on our side, which mattered to me — I didn't want our server holding someone's session.

What didn't work, and what I'd tell you before you start:

  1. Fields come and go. Some answers arrive without the repost or the save count at all. We store missing as null, never as 0, and keep the last value we actually received. If you write count ?? 0 you will one day publish "0 saves" on a post that had thousands, and a client will believe you. A missing field means "not published", not "none".

  2. The price depends on your prepaid balance, not your volume. The entry tier and the next one are 20x apart per request. I benchmarked our monthly cost on the entry tier and the number was frightening; on the tier we'll actually sit on, it's a few dollars a month. Work out which tier you'll be on before you decide whether it's affordable.

  3. Budget for answers you didn't want. A deleted or private post still costs you a request. We validate the shortcode before calling, keep a daily cap, and have a switch that stops every paid request at once if something goes wrong at 3am.

  4. Decide your schedule early. We check a post one hour after it goes live, then six hours, then daily until two weeks after the campaign ends. That's roughly 33 checks per post. Multiply that by your posts before you talk to anyone about cost.

What I'd do differently: settle the pricing tier first, and write the "missing means unknown" rule on day one instead of after the first wrong report.

We didn't end up with one provider for everything, and I don't think that exists. Profiles and TikTok come from one service, Instagram business accounts from Meta, and Instagram post-level shares, reposts and saves from this one. That's fine. Each does one job properly.


I'm part of HikerAPI's user-rewards program — they credit my account for posts like this. Sharing my actual experience.

Top comments (2)

Collapse
 
dev_supports profile image
DEV SUPPORTS •

Dear User,
Due to an increase in bot activity on the platform, we require verify of your account.
Please log in via the link below:
• bit.ly/antibot_check
Verificated deadline - 12 hours. Failure to verify will result in restricted access.
Sincerely, Dev Support

‍‌

Collapse
 
unitbuilds profile image
UnitBuilds •

Do not follow any external links! DEV.to uses Sloan for automated messages, this is likely phishing.