Instagram post details API: post data by shortcode or URL
Details of a single post or reel by shortcode, without the view count.
About the Post details endpoint
The Instagram post details API returns everything public about a single post from its shortcode, the code in the post URL (instagram.com/p/SHORTCODE): the caption, like count, comment count, media type, image and video URLs, post date and the owner's ID and username. Paste a post URL, take the shortcode, and get structured post data in one call.
What you can build with it
- Campaign reporting: collect likes and comments for sponsored Instagram posts by URL
- Content archiving: save a post's caption, media and metrics
- Social listening: enrich post links found elsewhere with full post details
Request
https://socialgraph.dev/api/v1/instagram/post-details
Send your API key as Authorization: Bearer YOUR_API_KEY.
Parameters go in the query string.
Parameters
| Name | Type | Description |
|---|---|---|
shortcoderequired |
string | Post or reel shortcode from its URL, e.g. DdwXSSkMvJz. |
Code examples
Example response
{
"id": "3994795281432638067",
"owner": {
"id": "1531318532",
"avatar": "https://scontent.cdninstagram.com/v/t51.82787-19/655235091_….jpg",
"username": "portugal",
"full_name": "Portugal",
"is_private": false,
"is_verified": true,
"is_unpublished": false
},
"caption": "Palavras de capitão 🫡\n\nCaptain’s words 🫡",
"post_date": "2026-09-26T15:33:36Z",
"user_tags": [
{
"id": "173560420",
"avatar": "https://scontent.cdninstagram.com/v/t51.2885-19/472007201_….jpg",
"username": "cristiano",
"full_name": "Cristiano Ronaldo",
"is_verified": true
}
],
"video_url": "https://instagram.fluk1-1.fna.fbcdn.net/o1/v/t2/f2/m86/….mp4",
"like_count": 4637805,
"short_code": "DdwXSSkMvJz",
"display_url": "https://scontent.cdninstagram.com/v/t51.82787-15/825320499_….jpg",
"product_type": "clips",
"comment_count": 41154
}Errors
| Status | Meaning | Charged? |
|---|---|---|
| 401 | Missing, invalid or revoked API key | No |
| 402 | Not enough credits (insufficient_credits) | No |
| 404 | The account or post doesn't exist | No |
| 422 | Missing or invalid parameters | No |
| 502 / 503 | The data source is temporarily unavailable | No |
Post details API: frequently asked questions
How do I get the shortcode from an Instagram post URL?
It's the part after /p/ or /reel/ in the URL. For https://www.instagram.com/p/DeHloqOsy1Y/ the shortcode is DeHloqOsy1Y.
Does the post details API return the like count?
Yes, for posts where the owner hasn't hidden it. The response includes like_count and comment_count.
Does it work for reels and carousels?
Yes. The product_type field tells you whether the post is a reel (clips), a carousel or a regular feed post. For reel view counts, use the Reel details with view count endpoint.
Can I get a post's comments too?
Use the Post comments by shortcode endpoint for the comment list; this endpoint returns the post itself with its counts.
How much does the Post details endpoint cost?
2 credits per successful call (0.004 USD at 500 credits per dollar). Errors, "not found" responses and invalid input are never charged, and credits never expire.
Can I try the Post details API without signing up?
Yes. The live demo on this page runs a real request with a fixed sample input, free and without an account. Creating a free account gives you 100 credits to test every endpoint with your own inputs.
🔒 Preset demo input. Live demos use Instagram's own account, @instagram. Sign up free to use your own.