Skip to content
scrapeatlas.Dashboard

Get an Instagram post or reel

Try in Playground

Retrieve a public Instagram post or reel with media URLs, caption, author, timestamps, engagement, comments, carousel items, audio, location and co-authors. Use trim for a compact projection and include_comments to select comment enrichment.

GET/v1/instagram/postx-api-key
x-api-keystringrequiredheader

Your ScrapeAtlas customer key. Create one on /account/ and set SCRAPEATLAS_API_KEY.

Query parameters
3
urlstringrequiredquery

instagram.com post, reel or video permalink (https://www.instagram.com/p/{code}/, /reel/{code}/, /tv/{code}/, optionally prefixed by a username; query strings and fragments ignored).

max 2048 chars

Examplehttps://www.instagram.com/p/ExAmPlE0002/
trimenumquery

true returns the reference's trimmed projection at the top level as xdt_shortcode_media: id, shortcode, __typename, thumbnail_src, display_url, video_url, has_audio, product_type, video_duration, clips_music_attribution_info, is_video, owner, edge_media_to_caption, edge_media_to_parent_comment, edge_media_preview_comment, taken_at_timestamp, edge_media_preview_like, is_paid_partnership and location.

one of: true, false

include_commentsenumquery

Default true. false answers from the media document alone: the comment edges are empty, the comment counters stay, and coverage reports comments_omitted (status partial). Carousels still read the post page for their child shortcodes.

one of: true, false

Response fields
23
requestIdstring

Request correlation identifier.

HTTP attempts for the operation (profile: one document, plus the page load the first time a handle is seen; basic-profile: one document; post-count: page; posts: page plus document the first time a handle is seen, otherwise the profile document, the session probe and the posts document; reels: document, plus the page when identified by handle; post: document plus page, or the document alone with include_comments=false on non-carousel media; comments: page; highlights: page, plus a document when identified by user id; all including the shared transient retry), decoded bytes and duration.

accounting.upstreamRequestsinteger

Always included.

≥ 0

accounting.responseBytesinteger

Always included.

≥ 0

accounting.durationMsnumber

Always included.

≥ 0

successboolean

True when usable data is returned; inspect status and coverage for omissions.

statusenum

success, partial, failed, or challenged. HTTP 200 can be partial.

one of: success, partial

sourceUrlstring

Canonical instagram.com URL of the profile, post or reel.

absolute HTTPS URL

fetchedAtstring

UTC retrieval time.

Complete means every source field of the operation was returned; comments_first_page_only (status partial) when more comments exist than the first page carries; comments_omitted (status partial) when include_comments=false left the comment edges empty.

coverage.sourcestring

Always included.

coverage.completeboolean

Always included.

coverage.warningsstring[]

Always included.

Always included.

Always included.

data.xdt_shortcode_media.__typenameenum

Always included.

one of: XDTGraphImage, XDTGraphVideo, XDTGraphSidecar

data.xdt_shortcode_media.idstring

Always included.

data.xdt_shortcode_media.shortcodestring

Always included.

min 1 chars

data.xdt_shortcode_media.is_videoboolean

Always included.

Author projection: id, username, is_verified, profile_pic_url, full_name.

data.xdt_shortcode_media.owner.idstring

Always included.

data.xdt_shortcode_media.owner.usernamestring

Always included.

min 1 chars

data.xdt_shortcode_media.taken_at_timestampinteger

Always included.

HTTP 200 returns the success variant. Check status: partial means usable data with warnings, and failed or challenged requests carry a failure object described in Errors & responses.

Error codes
16
HTTPfailure.codeMeaning
400invalid_requestMissing, duplicate, malformed or unsupported parameters, handles, ids, cursors or URLs.
401unauthorizedInvalid API key.
404not_foundUnknown handle, user id or post.
403restricted_pageThe page or document is private or gated (private account, gated media, login redirect).
422count_estimated_onlyInstagram abbreviates this post count and allow_estimated was not set.
429upstream_rate_limitedInstagram rate limited the page load or the GraphQL read.
502upstream_challengedInstagram refused the request with its error shell (status challenged).
502operation_unavailableInstagram no longer serves the pinned document for this operation.
502unsafe_redirectInstagram redirected the request somewhere other than the login form.
502unsupported_pageThe page or GraphQL result is missing, mismatched or structurally unsupported.
502response_too_largeThe decoded responses exceeded the operation's byte budget (1–3 MiB).
502payload_too_complexThe response exceeded the JSON depth or node limits.
502request_limitThe upstream request budget was exhausted.
502upstream_errorNetwork failure or HTTP 5xx after the single retry.
503busyAll retrieval slots are busy.
504timeoutThe 45-second deadline elapsed.