Social API — Instagram by media id


This method will return data about an individual instgram post. You can look up posts by their media id, which you must know in advance.

Definition

GET http://social.api.condenet.co.uk/instagram/media/<media_id>


Example request

$ curl http://social.api.condenet.co.uk/instagram/media/BJ2fRCcAzRL

Example response

{
  "data": {
    "author_id": 208475967,
    "author_name": "britishvogue",
    "author_url": "https://www.instagram.com/britishvogue",
    "height": null,
    "html": "...",
    "media_id": "1330388250224964683_208475967",
    "provider_name": "Instagram",
    "provider_url": "https://www.instagram.com",
    "thumbnail_height": 514,
    "thumbnail_url": "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/14099911_1753256008263830_1492011201_n.jpg?ig_cache_key=MTMzMDM4ODI1MDIyNDk2NDY4Mw%3D%3D.2",
    "thumbnail_width": 640,
    "title": "The case for stilettos this autumn, via the link in bio",
    "type": "rich",
    "version": "1.0",
    "width": 658
  }
}

Error handling

If the given media_id is not found, a 404 response will be returned.

Example error response

{
  "error": "Instagram id does not exist"
}

If Instagram themselves encounter an error, the following response will be returned along with the HTTP code instagram returned to the social api. You should very rarely see this type of error.

Example error response

{
  "error": "Bad request"
}