GET /v1/instagram/loggedout_timeline
Instagram public posts API: a profile's logged-out grid by username
Returns the posts grid of one Instagram profile as a logged-out visitor sees it, as Page[Post]: shortcode, kind, caption and media URLs. Send the handle; max_pages=1 answers one page at once, and any other value starts a job you poll.
- Price
- $0.0005 per page
- Billing
- $0.0005/page
- Batch
- Yes, through /v1/batch
- Failed calls
- Not charged
Example request
curl 'https://api.virev.ai/v1/instagram/loggedout_timeline?handle=instagram&max_pages=1' \
-H "Authorization: Bearer $VIREV_API_KEY"import os
import requests
response = requests.request(
"GET",
"https://api.virev.ai/v1/instagram/loggedout_timeline",
params={
"handle": "instagram",
"max_pages": "1",
},
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Parameters
| Name | In | Type | Description |
|---|---|---|---|
handle required | query | string | Instagram account handle (a leading @ is accepted). On the operations whose upstream call takes the numeric account id, the crawler resolves it; a handle it has never seen costs one extra anonymous profile read. |
since | query | string | Not accepted on this operation: its items carry no timestamp, so since returns 400 before billing. |
max_pages | query | integer | Maximum pages to fetch. -1 walks until exhaustion or since with no page cap, and must be written. Omitted, since alone bounds the walk; with neither, the job stops after 10 pages. Any positive integer is accepted. 1 returns one page synchronously with HTTP 200; any other value creates a durable job with HTTP 202. |
cursor | query | string | Opaque next_cursor from an earlier acquisition of this operation, also with get_raw=true. A native Instagram max_id or end_cursor from a raw page answers 400. Result download cursors belong to the results route. |
page_size | query | integer | Native first, default 12. Instagram controls the returned count. |
cached | query | auto | cache_only | live | auto (default) serves a read saved within the last 24 hours for these exact arguments, otherwise fetches. cache_only never contacts Instagram (404 not_cached when nothing is saved, whatever its age). live always fetches. Anything else is a 400. A saved read is an earlier answer of this operation for the same arguments; an account in the profile library (/v1/instagram/profile) is not one until this operation has read it. cache_only reads one saved page per request: omit max_pages or pass 1, and continue with next_cursor. |
get_raw | query | boolean | true returns the upstream JSON exactly as Instagram answered it instead of the normalized Page[Post]. |
Idempotency-Key | header | string | Reuse this key with the same inputs to recover a lost job submission. A different input with the same key returns 409. |
Example response
The example response of the API reference.
{
"data": {
"items": [
{
"id": "3700000000000000031",
"shortcode": "DlT1",
"taken_at": null,
"kind": "image",
"product_type": "feed",
"caption": "detector",
"hashtags": [],
"mentions": [],
"accessibility_caption": null,
"likes": null,
"comments": null,
"views": null,
"counts_hidden": null,
"comments_disabled": null,
"is_pinned": null,
"is_paid_partnership": null,
"owner": {
"id": "25025320",
"username": "instagram",
"full_name": null,
"is_verified": null,
"is_private": null,
"avatar_url": null,
"latest_story_at": null,
"extra": {}
},
"coauthors": [],
"sponsors": [],
"tagged": [],
"location": null,
"audio": null,
"thumbnail_url": "https://scontent.cdninstagram.com/d1.jpg",
"video_duration": null,
"media": [
{
"kind": "image",
"url": "https://scontent.cdninstagram.com/d1.jpg",
"width": null,
"height": null,
"duration": null
}
],
"media_urls": [
"https://scontent.cdninstagram.com/d1.jpg"
],
"extra": {}
}
],
"pages": [
{
"cursor": null,
"fetched_at": "2026-09-09T07:00:00+00:00",
"count": 1,
"signed_in": false
}
],
"next_cursor": "eyJhZnRlciI6IjM3MDAwMDAwMDAwMDAwMDAwMzEiLCJvcCI6ImxvZ2dlZG91dF90aW1lbGluZSJ9",
"has_more": true,
"stop_reason": "pages",
"coverage": {
"since": null,
"oldest_at": null,
"since_reached": false
}
},
"meta": {
"source": "live",
"fetched_at": "2026-09-09T03:10:22Z",
"cost": "$0.0005",
"balance": "$0.3777",
"request_id": "req_f1abb41157ca15c565d48a90bacef554"
}
}How it works
Wraps doc_id PolarisLoggedOutDesktopWWWProfilePostsTabContentQuery (first, after). With max_pages=1, returns Page[Post] under data; with get_raw=true returns the upstream JSON.
The default request creates a durable job (202). Use max_pages=1 for one synchronous Page response (200). Poll status_url, then read results_url with its opaque cursor. Acquisition stops at the first of since, max_pages, or exhaustion. Jobs continue after disconnects. Result responses are bounded to 3 MiB; this does not limit the crawl. An output unit above that byte budget fails the job before billing; results return 413. The selected raw or normalized mode never changes automatically. Supply Idempotency-Key to recover a lost submission response; reuse it with the same inputs.
Unknown, unsupported, and repeated query parameters return 400 before acquisition or billing.
The example response is the crawler's own projection of a synthetic upstream document into Page[Post], not a live capture.
Billing: $0.0005 per page, so a job bills $0.0005 for each page it reads. Jobs settle once after successful completion. Submission, polling and repeat downloads are free. Insufficient funds return 402 with no result data until a top-up covers the full charge.
Errors
| Status | When |
|---|---|
400 | The request parameters are invalid. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
403 | Instagram does not show this account to logged-out readers: it is private, hidden or restricted, or it no longer exists. Retrying will not change the answer until the account changes. You are not charged. |
404 | cached=cache_only found nothing saved for these arguments (not_cached; call again with cached=auto to fetch it), or the account, post, highlight, or location does not exist (not_found). |
429 | Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged. |
502 | The upstream fetch failed. You are not charged. |
503 | Billing could not be confirmed, so no upstream data was returned. |
504 | The upstream request timed out. You are not charged. |