Skip to content
scrapeatlas.Dashboard

Search Instagram posts and reels

Try in Playground

Find public Instagram posts and reels by keyword and retrieve each match with its media URLs, caption, author, timestamps and engagement counters. Results are ordered by relevance. Use trim for compact records and pass the returned cursor to retrieve another result page.

GET/v1/instagram/search/postsx-api-key
x-api-keystringrequiredheader

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

Query parameters
3
querystringrequiredquery

Keyword or phrase to find in public Instagram posts and reels; 1–300 characters.

min 1 chars · max 300 chars

Examplemeal prep
cursorstringquery

Continuation cursor returned by the previous response (engine and page, for example atlas:2), or null when there is no next page. Pass the value unchanged to request another page.

trimenumquery

true returns each post in the compact projection of Get an Instagram post or reel with trim=true.

one of: true, false

Response fields
26
requestIdstring

Request correlation identifier.

HTTP attempts, decoded bytes and duration for post discovery and the Instagram post reads (one media document per post, plus the logged-out post document for carousels; the logged-out post document alone while Instagram refuses the media document).

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

Search index URL used to discover the returned posts.

absolute HTTPS URL

fetchedAtstring

UTC retrieval time.

The source is web_search and the order is relevance. web_index_selection is always present (status partial); posts_omitted when an indexed post is no longer public; post_reads_stopped when Instagram refused further reads and the posts read before are returned; web_index_fallback when the first index page held no post or reel link and the next index served the posts; post_details_partial when one or more posts were read from the logged-out post layout (see Get an Instagram post or reel).

coverage.sourcestring

Always included.

coverage.completeboolean

Always included.

coverage.warningsstring[]

Always included.

coverage.orderstring

Always included.

querystring

Keyword or phrase to find in public Instagram posts and reels; 1–300 characters.

min 1 chars

Up to 10 matching public posts and reels per page, each in the layout of Get an Instagram post or reel without comments (comment counts stay; comment edges are empty).

up to 10 items

posts.idstring

Always included.

posts.shortcodestring

Always included.

min 1 chars

posts.__typenameenum

Always included.

one of: XDTGraphImage, XDTGraphVideo, XDTGraphSidecar

posts.is_videoboolean

Always included.

Always included.

posts.owner.idstring

Always included.

posts.owner.usernamestring

Always included.

min 1 chars

posts.taken_at_timestampinteger

Always included.

posts.urlstring

Always included.

absolute HTTPS URL

cursorstringnullable

Continuation cursor returned by the previous response (engine and page, for example atlas:2), or null when there is no next page. Pass the value unchanged to request another page.

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
18
HTTPfailure.codeMeaning
400invalid_requestMissing, duplicate, malformed or unsupported parameters, handles, ids, cursors or URLs.
401unauthorizedInvalid API key.
404not_foundUnknown handle, user id, post, or a keyword without a popular page.
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–5 MiB).
502payload_too_complexThe response exceeded the JSON depth or node limits.
502request_limitThe upstream request budget was exhausted.
502search_failedThe search index did not answer, or no indexed post could be read.
502upstream_errorNetwork failure or HTTP 5xx after the single retry.
503search_unavailableKeyword search has no search index configured.
503busyAll retrieval slots are busy.
504timeoutThe 45-second deadline elapsed.