Instagram · profile · post count
Public Instagram post count. GET /v1/instagram/profile/post-count accepts your x-api-key header. Costs 1 credit per successful fresh call; failures and opt-in cache hits (cache_max_age) are free. Native path: GET /api/v1/web/instagram/profile/post-count. Same request parameters and JSON shape as the reference API, so you can switch by changing the base URL.
Request parameters
Exact number of posts on a public profile, read from the logged-out profile embed (falls back to the profile page). Works for any public account, no connected Instagram account needed.
| Parameter | Type | Required | Description |
|---|---|---|---|
handle | string | Yes | Public Instagram username (without @). |
allow_estimated | boolean | No | Estimated counts. Accepted for compatibility and ignored (guest source). |
freshness | string | No | 24h (default), 1h, 7d, or live. Accepted cache hits are free; live forces refresh except simultaneous requests may share newly fetched data. |
Code examples
Set SIGNALSHELF_BASE_URL (https://signalshelf.dev) and SIGNALSHELF_API_KEY on your server.
curl "$SIGNALSHELF_BASE_URL/v1/instagram/profile/post-count?handle=virat.kohli" \
-H "x-api-key: $SIGNALSHELF_API_KEY"const response = await fetch(process.env.SIGNALSHELF_BASE_URL + "/v1/instagram/profile/post-count?handle=virat.kohli", {
headers: { 'x-api-key': process.env.SIGNALSHELF_API_KEY },
});
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body);import os, requests
response = requests.get(
os.environ['SIGNALSHELF_BASE_URL'] + "/v1/instagram/profile/post-count?handle=virat.kohli",
headers={'x-api-key': os.environ['SIGNALSHELF_API_KEY']},
timeout=30,
)
response.raise_for_status()
print(response.json())Example response
Real response to GET /v1/instagram/profile/post-count?handle=virat.kohli, fetched 2026-11-17 in 0.6 s. Lists are cut to one item and long text is shortened. Every response also carries credits_remaining.
{
"success": true,
"credits_charged": 1,
"guest": {
"duration_ms": 6152,
"served_from": "warm-store",
"age_seconds": 50
},
"handle": "virat.kohli",
"sample": false,
"platform": "instagram",
"provider": "instagram-guest-web",
"resource": "instagram/profile/post-count",
"media_count": 1058,
"is_estimated": false,
"data": {
"guest": {
"duration_ms": 6152,
"served_from": "warm-store",
"age_seconds": 50
},
"handle": "virat.kohli",
"sample": false,
"platform": "instagram",
"provider": "instagram-guest-web",
"resource": "instagram/profile/post-count",
"media_count": 1058,
"is_estimated": false
},
"meta": {
"event_id": "fb54a5a4-0232-4215-830f-85925f4421d3",
"mode": "live",
"cache": "MISS",
"credits_charged": 1,
"fetched_at": "2026-11-17T11:14:44.974Z",
"age_seconds": 0,
"duration_ms": 25
}
}Response fields
Read from the example above. Fields the source leaves out for a given item are omitted or null.
| Field | Type | Description |
|---|---|---|
success | boolean | true when the lookup worked. |
credits_charged | number | Credits this call cost. 0 for failures and accepted cache hits. |
guest | object | Contains: duration_ms, served_from, age_seconds. |
handle | string | For example "virat.kohli". |
sample | boolean | For example false. |
platform | string | For example "instagram". |
provider | string | For example "instagram-guest-web". |
resource | string | For example "instagram/profile/post-count". |
media_count | number | For example 1058. |
is_estimated | boolean | For example false. |
data | object | Contains: guest, handle, sample, platform, provider, resource, media_count, is_estimated. |
meta | object | Contains: event_id, mode, cache, credits_charged, fetched_at, age_seconds, duration_ms. |
data.guest | object | Contains: duration_ms, served_from, age_seconds. |
data.handle | string | For example "virat.kohli". |
data.sample | boolean | For example false. |
data.platform | string | For example "instagram". |
data.provider | string | For example "instagram-guest-web". |
data.resource | string | For example "instagram/profile/post-count". |
data.media_count | number | For example 1058. |
data.is_estimated | boolean | For example false. |
Errors and credits
Failed calls cost nothing. 400: invalid parameters. 401: missing or revoked key. 402: no credits left. 404: not found at the source. 429: rate limit. 502 or 503: the source blocked or failed the lookup; retry later.
More Instagram endpoints
20 other Instagram endpoints use the same key and credits.