YepAPI
Instagram API

Post Details

Get full details for an Instagram post by its shortcode.

POST/v1/instagram/post
$0.01/call

Usage

const res = await fetch('https://api.yepapi.com/v1/instagram/post', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ shortcode: 'C5xAbCdEfGh' }),
});
const { data } = await res.json();
console.log(data);
curl -X POST https://api.yepapi.com/v1/instagram/post \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"shortcode": "C5xAbCdEfGh"}'

Request Body

ParameterTypeRequiredDescriptionDefault
shortcodestringYesPost shortcode from the Instagram URL

Response

{
  "ok": true,
  "data": {
    "id": "3456789012345678901",
    "shortcode": "C5xAbCdEfGh",
    "type": "GraphImage",
    "caption": "A stunning sunset over the Sahara Desert. Photo by @photographer_name",
    "like_count": 450000,
    "comment_count": 1200,
    "taken_at": 1712345678,
    "display_url": "https://scontent.cdninstagram.com/...",
    "is_video": false,
    "video_url": null,
    "video_view_count": null,
    "video_duration": null,
    "owner": {
      "id": "787132",
      "username": "natgeo",
      "full_name": "National Geographic",
      "profile_pic_url": "https://scontent.cdninstagram.com/...",
      "is_verified": true
    },
    "location": {
      "name": "Sahara Desert",
      "lat": 23.4162,
      "lng": 25.6628
    },
    "tagged_users": [
      {
        "username": "photographer_name",
        "full_name": "John Photographer"
      }
    ]
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.idstringUnique post identifier
data.shortcodestringPost shortcode
data.typestringPost type: GraphImage, GraphVideo, or GraphSidecar
data.captionstringPost caption text
data.like_countnumberNumber of likes
data.comment_countnumberNumber of comments
data.taken_atnumberUnix timestamp of when the post was published
data.display_urlstringFull-size image URL
data.is_videobooleanWhether the post is a video
data.video_urlstring|nullVideo URL (null for images)
data.video_view_countnumber|nullVideo view count (null for images)
data.ownerobjectPost author information
data.locationobject|nullTagged location (if any)
data.tagged_usersobject[]Users tagged in the post

The shortcode is the unique identifier found in Instagram post URLs: https://www.instagram.com/p/{shortcode}/

On this page