15

Recently Instagram announced support for multiple photos post.

I tried with endpoint, GET /media/media-id, but response has information about only one image.

Anyone is able to retrieve all images from single multiple photo post using their API?

Thanks.

Kevin
  • 901
  • 1
  • 7
  • 15

2 Answers2

26

Not available in official API yet, but you can use the "Instagram Photo Page URL" and add ?__a=1, this will give you JSON with all the multi-images in it.

For example:

https://www.instagram.com/p/BQ00n_BB7Dm/?__a=1

You will get JSON response with media.edge_sidecar_to_children.edges[] will have all media urls and info

krisrak
  • 12,882
  • 3
  • 32
  • 46
  • 1
    This only works if the photo is either public, or the user is authenticated on the Instagram website though, right? Clever workaround for that scenario, but doesn't work for private accounts. – adoss Mar 13 '17 at 22:46
  • Specifically it's edge_sidecar_to_children.edges.#.node.display_resources.2.src which has the URL for 1080x1080 image. The # is the index (zerobased) in the carousel. – MyICQ Aug 11 '20 at 10:10
4

Instagram API now supports the "multi photo" posts.

If a post is of type "multi photo", in the API the "type" property will now be with the value "carousel" and the "mediaData" property will contain "carousel_media" property with an array of the images (posts).

Snir Segal
  • 196
  • 1
  • 2