Search code examples
endpointinstagram-apibulk

Instagram API get bulk objects by comma separated IDs


I have a simple application where I have a bulk Instagram object ids. I'm looking for an API, from where I can send the ids as a comma separated string or in a similar fashion and get a list of Instagram objects. I'm unable to find an endpoint in the official Instagram API.

I do not want to retrieve each object one by one as I require to retrieve a bulk data and retrieving one by one would be too time consuming, and would exhaust my resources.

A similar function in twitter can be found below

https://dev.twitter.com/rest/reference/get/statuses/lookup

I'm looking for a similar function for Instagram. Is there a solution for this?

FYI i'm looking for another solution other than the Instagram endpoint - tags/hello/media/recent because I need information from multiple id's at the same time. Also the number of information retrieved by this endpoint is insufficient.


Solution

  • There is no API to get media data by id in bulk, you have to make 1 API call per id in a loop.

    There is an API limit of 5000 calls/hour, so this may limit you based on the number of media items you want to retrieve.

    You can use this API call in a loop to get media data by id:

    https://api.instagram.com/v1/media/{media-id}?access_token=ACCESS-TOKEN