Instagram Post Details avatar

Instagram Post Details

Pricing

from $2.00 / 1,000 instagram post details

Go to Apify Store
Instagram Post Details

Instagram Post Details

Resolve public Instagram post details and downloadable media assets through the legacy GraphQL implementation.

Pricing

from $2.00 / 1,000 instagram post details

Rating

0.0

(0)

Developer

NewLai

NewLai

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

7 days ago

Last modified

Categories

Share

What does Instagram Post Details GraphQL API do?

Instagram Post Details GraphQL API converts public Instagram post shortcodes into normalized post and media metadata from public post pages, with a persisted GraphQL query as a fallback. Each Dataset row describes one public post on Instagram and includes its creator, caption, visible engagement, media flags, and an array of image or video asset URLs. Apify adds API access, schedules, integrations, proxy rotation, retries, storage, and monitoring around this focused Instagram post details API alternative.

This Actor exists separately from the newer page parser because the original project exposed both interfaces. It returns metadata only; use Instagram Media Downloader API for binary files.

Why use the GraphQL post resolver?

  • Normalize embedded post data and GraphQL responses into a stable Dataset schema.
  • Resolve known shortcodes in bulk without crawling user feeds first.
  • Retrieve a consistent asset list for downstream download or analysis.
  • Compare results with the newer page parser during Instagram API transitions.

How to get Instagram post details

  1. Copy the shortcode from an Instagram /p/ or /reel/ URL.
  2. Add one or more values to postCodes in the Input tab.
  3. Keep raw output off for normal runs and use the configured proxy with moderate concurrency.
  4. Click Start.
  5. Open the Dataset or use the API endpoint shown in the run.

Input

See the Input tab for all configuration options. Duplicate post codes are ignored while order is preserved. includeRaw attaches the original media object, and maxConcurrency limits simultaneous post lookups.

{"postCodes":["C4MEygtSuiu","ABC123"],"includeRaw":false,"maxConcurrency":3}

Proxy environment variables

Operators can override the input proxy settings through the Actor's environment. The first nonblank setting wins:

  1. INSTAGRAM_PROXY_CONFIGURATION: a JSON object in the same format as the input's proxyConfiguration.
  2. INSTAGRAM_PROXY_URL: a single HTTP or HTTPS proxy URL, with optional username and password.
  3. The input's proxyConfiguration, or the default GB residential proxy when omitted.

For one custom proxy:

$export INSTAGRAM_PROXY_URL='http://username:password@proxy.example.com:8000'

For multiple custom proxies:

$export INSTAGRAM_PROXY_CONFIGURATION='{"useApifyProxy":false,"proxyUrls":["http://username:password@proxy1.example.com:8000","http://username:password@proxy2.example.com:8000"]}'

The JSON setting can also select Apify Proxy, for example {"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"],"apifyProxyCountry":"US"}, or disable the Actor's proxy with {"useApifyProxy":false}.

Environment settings replace the input proxy configuration entirely. Blank values are ignored. Malformed JSON and invalid custom proxy URLs stop the run instead of falling back to the input. Custom proxies do not trigger the GB-to-DE country fallback; that fallback still applies when the effective configuration selects GB residential Apify Proxy.

For cloud deployment, add the chosen variable to environmentVariables in .actor/actor.json. A Secret reference such as "INSTAGRAM_PROXY_URL": "@instagramProxyUrl" keeps the proxy credentials out of source. For local development, set the variable in the environment or the Actor's .env file before running apify run.

Output

You can download the Dataset in various formats such as JSON, HTML, CSV, or Excel.

{"success":true,"postCode":"ABC123","postUrl":"https://www.instagram.com/p/ABC123/","username":"creator","caption":"Example","isVideo":true,"hasAudio":true,"assets":[{"position":1,"type":"video","url":"https://scontent.cdninstagram.com/video.mp4","width":1080,"height":1920}],"error":null}

What Instagram post data is extracted?

FieldTypeDescription
postCode, postUrl, mediaIdstringPublic post identifiers.
username, captionstringCreator and public caption.
likeCount, commentCountintegerVisible engagement counts.
isVideo, hasAudiobooleanMedia properties.
assetsarrayBest image/video URLs and dimensions.
success, errorboolean, stringPer-post diagnostics.

How much does Instagram post resolution cost?

The Actor uses pay-per-event pricing and charges only for successful post-detail rows. Error rows are free.

Apify planPrice per successful post
Free$0.0025
Bronze$0.0020
Silver$0.0020
Gold$0.0020
Platinum$0.0020
Diamond$0.0020

Each attempt first requests the public post page. If that page cannot provide the requested media, the Actor falls back to an anonymous session-bootstrap request and a GraphQL request; retries are bounded. Each run also has the standard $0.00005 Actor-start event at the default memory. Test a few codes first and keep concurrency moderate to reduce rate limits.

Tips, limitations, and migration

Instagram can rotate persisted GraphQL document IDs. The Actor first parses the requested post from embedded page JSON, including newer shortcode and media-info shapes. When page extraction fails, it uses PolarisPostRootQuery, establishes an anonymous CSRF session, and keeps the bootstrap and GraphQL POST on the same proxy session with one consistent Chrome browser fingerprint. It supplies a CSRF cookie if the bootstrap response omits one. Complete JSON documents are accepted without waiting for the proxy to close the response; invalid, oversized, login-required, and rate-limited responses remain errors. HTML challenge pages, login-required JSON, and rate-limit responses are classified separately before the Actor rotates to a new proxy session. With the default proxy setting, the first attempt uses a GB residential exit; after a failure the run switches to DE and keeps DE active. Failures are limited to two retries (three total attempts). A user-selected non-GB country or custom proxy URL is respected and does not trigger the automatic fallback. Start with the default concurrency of 3; if every proxy session returns structurally valid JSON without media, check for another document-ID migration. Asset URLs can expire, so download authorized files promptly.

Only public post data is processed. Respect Instagram's terms, copyright, privacy law, and rate limits. Do not collect personal data without a legitimate basis. Use the Issues tab for support and the API tab for generated code examples.