user3143922
user3143922

Reputation: 29

Historical Followers Count in Instagram Graph Api

I wonder how this website among others got followers_count history data so it shows gained and lost followers.

Followers Evolution #1 Followers Evolution #2

I searched in Instagram Graph Api documentation and I found that there is an "insights" api that can be used to get social interaction metrics for IG Users. But, among available metrics a metric called "followers_count" which is the "Total number of new followers each day within the specified range". so the api provides new followers count not the entire follower count over time. As I said in the beginning how is it possible to draw the followers evolution graph as many IG analytics websites do? am I messing something?

Upvotes: 1

Views: 4352

Answers (1)

veuncent
veuncent

Reputation: 1712

It is possible that those websites used the field 'followers_count' on the User node to get a starting point. This gives the total number of followers at the time of the request. From there you could calculate a running total by subtracting the daily follower count from the Insights api that you mention.

Get current follower count:
curl -i -X GET "https://graph.facebook.com/v8/<user id>?fields=followers_count&access_token=EAACwX..."

https://developers.facebook.com/docs/instagram-api/reference/user

Get new followers for single day:
curl -i -X GET "https://graph.facebook.com/v8/<user id>/insights?metric=follower_count&period=day&since=2020-10-5T07:00:01&until=2020-10-06T07:00:00

https://developers.facebook.com/docs/instagram-api/reference/user/insights

Upvotes: 1

Related Questions