How to make more posts/data appear on instagram

Viewed 93
2 Answers

Using ?__a=1 parameter is a neat trick to get JSON data for any Instagram page, but it's not an official API; Instagram can block your IP address any time and the endpoint is not guaranteed to remain stable.

The official way to look up media via hashtag is with Graph API Hashtag Search.

See getting started for initial steps. You need a business account ID for your Instagram profile which is required parameter for hashtag search. Then you can do these steps:

  1. Find the ID of the hashtag you are looking for, for example:

    GET https://graph.facebook.com/v13.0/ig_hashtag_search?user_id=<business account ID>&q=meugatonovet&access_token=<user access token>
    

    This will return a JSON of the hashtag:

    {
     "data": [
       {
         "id": "17878113037414936"
       }
     ]
    }
    
  2. Use that ID in other requests, for example /recent_media:

    GET https://graph.facebook.com/v13.0/17878113037414936/recent_media?user_id=<business account ID>&fields=id,media_type,comments_count,like_count,media_url&access_token=<user access token>
    

    The response will also provide the pagination cursor which lets you read all the data within API limitations.

Other less official options are web scraping or using Instagram's private API (there are actively maintained libraries for that, like instagram-private-api), but mind that this might get you banned and it breaks Instagram's ToS. It's probably fine for a personal project, but not so fine for a commercial use.

This endpoint is not working anymore:

https://www.instagram.com/explore/tags/username/?__a=1

However, a possible solution is adding __d=dis to your payload:

https://www.instagram.com/explore/tags/username/?__a=1&__d=dis

Please, take into account that this is an unofficial method, and you can get banned as @jnv advised.

Best regards

Related