3

Instagram API removed the following endpoint:

GET /users/search

which I was using to get images from my profile on my website.

Is there any way to do this now? I can't find any info since this is very new.

nick
  • 2,819
  • 5
  • 33
  • 69
  • Yeah I'm wondering this as well. I cannot seem to find it. It seems to me that you need to use their Graph API, but that requires an extensive app. I think embedding Instagram is over now. – Kuubs Apr 05 '18 at 18:30

3 Answers3

16

You can get at least the newest 12 pictures from a public account by using this URL scheme:

https://www.instagram.com/[name_of_account]/?__a=1

You can parse the Json output and find the image-URL in display_url

This also works with hashtags and locations:

https://www.instagram.com/explore/tags/hawaii/?__a=1
Aljosha
  • 222
  • 2
  • 9
  • Thank you aljosha, I would have few questions. Can we trust those links? I mean, is there any information about those links from Instagram or Facebook side? Can we use them for business or personal use? Are they going to change one day? – Vural Jan 22 '20 at 12:47
  • This URL often has problems, which is why there is another one here: https://stackoverflow.com/questions/72467565/error-when-scraping-instagram-media-by-adding-at-the-end-of-url-a-1 – Flimtix Jun 19 '22 at 16:31
1

you can show your own media, https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN just enter access token an you will be able to get your media data

0

I do not see any way via either the old Instagram API or via the new Facebook graph API for Instagram Business Accounts to get profile images for accounts that are not yours. If it is an Instagram Business Account, you could get the Facebook profile image from the Facebook page associated with that Instagram account; but if it is a non-business Instagram account, that won't work. More documentation here: https://developers.facebook.com/docs/instagram-api/overview

sethpollack
  • 1,348
  • 1
  • 12
  • 13
  • 1
    So it is basically impossible to retrieve images now? How does elfsight it then? https://elfsight.com/blog/2018/02/instagram-graph-api-changes/ down below you can type in any username. is that a dedicated app? – Kuubs Apr 05 '18 at 19:08
  • @HuubS not sure. could be page scraping perhaps? – sethpollack Apr 06 '18 at 01:44
  • I'm not sure as well, but with the answer below I could get my simple page plugin back to work – Kuubs Apr 06 '18 at 08:19