Social networks
Instagram API
Retrieve public Instagram profiles, posts and reels feeds, single posts and reels, first-page comments, highlight albums and exact post counts as Instagram's own web client receives them, without an account.
Retrieve Instagram profiles, post counts, posts, reels, comments and story highlight albums, with optional compact records.
API availability: Coming soon
http://localhost:3037Public API: https://api.scrapeatlas.com.Endpoints
/v1/instagram/profileGet an Instagram profile
Retrieve a public Instagram profile by handle or numeric user ID, including identity, bio, links, follower and following counts, verification, business category and profile pictures. Use trim for a compact projection.
Reference/v1/instagram/basic-profileGet an Instagram basic profile
Retrieve a public Instagram profile by numeric user ID, with the user fields at the top level.
Reference/v1/instagram/profile/post-countGet an Instagram profile post count
Read the post count displayed on an Instagram profile. Set allow_estimated=true to accept abbreviated counts scaled to numbers.
Reference/v1/instagram/user/postsList Instagram user posts
List public Instagram photos, videos, carousels and reels shared to a profile grid, with creation timestamps, canonical URLs and the profile header. Pass next_max_id for the next page; trim selects compact records.
Reference/v1/instagram/user/reelsList Instagram user reels
List public Instagram reels with identifiers, play, like and comment counts, thumbnails and co-authors. Pass max_id for the next page; trim selects compact records.
Reference/v1/instagram/postGet an Instagram post or reel
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.
Reference/v1/instagram/post/commentsList Instagram post comments
Read a public Instagram post or reel comment page with text, authors, timestamps, like counts and reply counts.
Reference/v1/instagram/user/highlightsList Instagram user highlights
List Instagram story highlight albums with identifiers, titles, cover thumbnails and owners.
ReferenceQuick start
Create an API key on your account page, then call the public API. Values below are placeholders.
curl "https://api.scrapeatlas.com/v1/instagram/profile?handle=example" \
-H "x-api-key: YOUR_API_KEY"Coverage & limits
- Independent worker on port 3037, INSTAGRAM_API_KEY in x-api-key. No Instagram account, login, storage, media download or product dependency; one anonymous session per operation with a browser TLS fingerprint. The only memory kept between operations is a bounded map of handle to numeric user id (identifiers only, 15 minutes, 10,000 entries) so that repeat reads of an account skip its profile page.
- Four concurrent operations, 45-second deadline, at most four upstream requests per 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 35 KB session probe and the posts document; reels = document (plus the page when identified by handle); post = document plus page (the document alone with include_comments=false on photos and videos); comments = page; highlights = page (plus a document when identified by user id); each with one shared transient retry for network failures or HTTP 5xx. Challenges, rate limits and 4xx answers are never retried.
- Decoded response budget per operation (about twice the largest read observed): 1 MiB basic-profile, 2 MiB profile, post-count, comments and highlights, 3 MiB posts, reels and post; 600,000 JSON nodes, 64 levels, 50 items per page (12 per source page), 50 comments and 100 highlights.
- Pagination is caller-carried: posts return next_max_id, reels return paging_info.max_id (top-level max_id with trim). Comments return the first page (comments_first_page_only marks further pages, also inside the single-post layout; include_comments=false leaves them out of the single post as comments_omitted); highlight albums list with their covers. Private accounts answer with empty lists and a private_account warning or restricted_page.
- Document ids are pinned to the documents the web client uses; when Instagram retires one, the operation fails operation_unavailable instead of guessing.
- Handles are 1–30 letters, digits, periods and underscores (leading @ accepted), user ids are numeric, post URLs are instagram.com /p/, /reel/, /reels/ or /tv/ permalinks (query strings and fragments ignored). Identity is verified against the request; mismatches fail unsupported_page.
- Optional INSTAGRAM_PROXY_URL (falling back to TWITCH_PROXY_URL, then REDDIT_PROXY_URL) routes every operation through a fresh residential proxy session for hosts that need one.
| HTTP | failure.code | Meaning |
|---|---|---|
| 400 | invalid_request | Missing, duplicate, malformed or unsupported parameters, handles, ids, cursors or URLs. |
| 401 | unauthorized | Invalid API key. |
| 404 | not_found | Unknown handle, user id or post. |
| 403 | restricted_page | The page or document is private or gated (private account, gated media, login redirect). |
| 422 | count_estimated_only | Instagram abbreviates this post count and allow_estimated was not set. |
| 429 | upstream_rate_limited | Instagram rate limited the page load or the GraphQL read. |
| 502 | upstream_challenged | Instagram refused the request with its error shell (status challenged). |
| 502 | operation_unavailable | Instagram no longer serves the pinned document for this operation. |
| 502 | unsafe_redirect | Instagram redirected the request somewhere other than the login form. |
| 502 | unsupported_page | The page or GraphQL result is missing, mismatched or structurally unsupported. |
| 502 | response_too_large | The decoded responses exceeded the operation's byte budget (1–3 MiB). |
| 502 | payload_too_complex | The response exceeded the JSON depth or node limits. |
| 502 | request_limit | The upstream request budget was exhausted. |
| 502 | upstream_error | Network failure or HTTP 5xx after the single retry. |
| 503 | busy | All retrieval slots are busy. |
| 504 | timeout | The 45-second deadline elapsed. |