1

I'm using Instagram API to find top users search by a given username using this Instagram endpoint :

"https://www.instagram.com/web/search/topsearch/?context=blended&query="  . $username . "&include_reel=false&count=50"

when I'm logged in in the browser and I GET the URL via the browser I get the list of users as a json but when I get the URL using PHP on my server-side I get the login HTML page.

Is there is any way to use an access_token in order to get the JSON, not the login page?

  • The fact that the path starts with `/web/` is probably a good indicator that this is not an API you are supposed to use for your own purposes. – CBroe Jul 05 '21 at 06:35
  • thank you for this good remarque, so can you tell me the good API to use for this use case? – Ilyas Ariba Jul 09 '21 at 19:35
  • @CBroe could you please suggest which instgram API should I choose for search instagram users and their data like https://instanavigation.com/ Should I choose graph API or basic display API? – Deep Kakkar Jun 30 '23 at 08:38

1 Answers1

0

See this why it doesn't work on server side.
https://stackoverflow.com/a/67760807/13565880

And found this solution to create a session with a username and a password. https://stackoverflow.com/a/50430275/13565880

marty
  • 106
  • 2
  • 5
  • could you please suggest which instgram API should I choose for search instagram users and their data like instanavigation.com Should I choose graph API or basic display API? – Deep Kakkar Jun 30 '23 at 08:38