Skip to content

Fetch one Instagram post by URL or shortcode, with caption, owner, like and comment counts and its latest comments.

GET · POST1 credit / successful callSingle lookup
GEThttps://api.scrapier.io/api/v2/instagram-post-scraper/Open in Playground

Send a post, reel or tv URL, or a bare shortcode, in urls. You get back one post object with its ID, type, shortcode, caption, URL, like and comment counts and the owner’s username.

detail_level (on by default) returns full detail including comments, and comments_per_post sets how many of the latest comments are kept. One record, no pagination.

  • Enrich a list of post links with engagement numbers.
  • Archive a post’s caption and latest comments.
Terminal window
curl -G "https://api.scrapier.io/api/v2/instagram-post-scraper/" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "urls=https://www.instagram.com/p/DXHKcyvEWfr/" \
--max-time 210
NameTypeRequiredDefaultDescription
X-API-Key headerstringyes—Your API key from the dashboard.
urlsstringyese.g. https://www.instagram.com/p/DXHKcyvEWfr/Instagram post/reel/tv URL or bare shortcode. One record, no pagination.
cursorstringno—Pagination cursor returned in the previous response's next_cursor. Pass it back unchanged to fetch the next page. When next_cursor is null, you have reached the last page.
detail_levelbooleannotrueFull detail incl. comments.
locked in cursor
comments_per_postintegerno10Latest comments kept.
locked in cursor
Advanced
NameTypeDefaultDescription
use_proxybooleantrueRoute the request through Scrapier's residential proxy pool. Default: true. Leave as is unless support tells you otherwise.
raw_databooleanfalseWhen true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under raw_responses, in place of the formatted items. When false (default) you get the formatted output. Pagination (cursor / next_cursor) works the same in both modes.
{
"success": true,
"data": {
"urls": "https://www.instagram.com/p/DXHKcyvEWfr/",
"post": {
"inputUrl": "https://www.instagram.com/p/DXHKcyvEWfr/",
"id": "3875111963462821867",
"type": "Video",
"shortCode": "DXHKcyvEWfr",
"caption": "One trip to Italy is never enough. #TucciinItaly",
"url": "https://www.instagram.com/p/DXHKcyvEWfr/",
"commentsCount": 1637,
"likesCount": 117980,
"ownerUsername": "natgeo"
},
"next_cursor": null
}
}

Sample from the live catalog; arrays trimmed to 3 items. Results are in data.post.

FieldTypeExampleDescription
urlsstringhttps://www.instagram.com/p/DXHKcyvEWfr/—
postobject{…}The results.
next_cursornullnullPass back as cursor for the next page. null on the last page.
post.inputUrlstringhttps://www.instagram.com/p/DXHKcyvEWfr/—
post.idstring3875111963462821867—
post.typestringVideo—
post.shortCodestringDXHKcyvEWfr—
post.captionstringOne trip to Italy is never enough. #TucciinItaly—
post.urlstringhttps://www.instagram.com/p/DXHKcyvEWfr/—
post.commentsCountinteger1637—
post.likesCountinteger117980—
post.ownerUsernamestringnatgeo—

Returns everything in one call; next_cursor is always null.

Failed calls are free. Branch on the HTTP status and read the message from error (or detail). Full details in Errors.

StatusMeaningRetry?Charged?
400Bad or missing input.No — fix the paramsNo
401 / 403Missing, invalid or revoked API key.No — fix the keyNo
402Out of credits (body has balance).No — top upNo
404Unknown endpoint slug.No — check the slugNo
429 / 503Busy or throttled.Yes — after Retry-AfterNo
5xxTarget site or upstream failure, or timeout.Yes — with backoffNo
  • For reels you also want the view count, use instagram-reel-scraper.
  • Instagram Reel — Fetch one Instagram reel by URL or shortcode, with caption, owner, view, like and comment counts and its latest comments.
  • Instagram Comments — List the comments on a public Instagram post, with author, text and like count, from the post URL.
  • Instagram Transcript — Transcribe the speech in an Instagram reel or video post from its URL, with detected language and the post’s like and comment counts.