Instagram Profile Post Count API
The total post count on a public Instagram profile, exact wherever Instagram publishes the exact figure. Call this when a fuller profile is not needed. source names which of the two dialects Instagram ships a count in carried it (edge_owner_to_timeline_media.count or media_count). Instagram does not expose this metadata for every profile: when neither is present, postCount is null and the request is not charged. Calls cost 1 credit each. A cache hit is free, and a failed or empty response is never charged.
Try it
Prefilled with the request that produced the example below. No key yet? Get a free key.
Request
/v1/instagram/profile-post-count| Parameter | Type | Required | Description |
|---|---|---|---|
| handle | string | yes | Handle (@nike), or a full instagram.com profile URL |
Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).
curl "$API/v1/instagram/profile-post-count?handle=natgeo&cache_max_age=7d" \
-H "x-api-key: $KEY"const query = new URLSearchParams({
handle: 'natgeo',
cache_max_age: '7d',
});
const response = await fetch(`${API}/v1/instagram/profile-post-count?${query}`, {
headers: { 'x-api-key': KEY },
});
const body = await response.json();
if (!body.success) throw new Error(body.error.code);
// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);import os, httpx
r = httpx.get(
f"{os.environ['API']}/v1/instagram/profile-post-count",
params={
"handle": "natgeo",
"cache_max_age": "7d",
},
headers={"x-api-key": os.environ["KEY"]},
timeout=30,
)
body = r.json()
if not body["success"]:
raise RuntimeError(body["error"]["code"])
print(body["data"], body["meta"]["creditsCharged"])Example response
Captured on , with raw removed and lists cut to two items. A live call returns current data.
{
"success": true,
"data": {
"platform": "instagram",
"handle": "natgeo",
"postCount": 32100,
"source": "api",
"fetchedAt": "2026-10-21T01:52:32.904Z"
},
"meta": {
"platform": "instagram",
"endpoint": "instagram.profilePostCount",
"creditsCharged": 1,
"cached": false,
"cacheAgeSeconds": null,
"durationMs": 3035,
"requestId": "req_060jiyavkdp9l82k0he6"
}
}Returns
Returns an object with platform, handle, postCount, source, fetchedAt, reason.
Fields
| Field | Type | Present | Description |
|---|---|---|---|
| platform | "instagram" | always | |
| handle | string | always | |
| postCount | number | null | always | |
| source | graphql | api | null | always | Which dialect carried the count. Null when neither did. |
| fetchedAt | string | always | |
| reason | string | may be absent | Present only when `postCount` is null. That response is not charged. |
Cost and behaviour
| Credits | 1 per live request, 0 on a cache hit |
| Cacheable | yes: cache_max_age accepts a cached copy |
| Batchable | yes: usable as a target in POST /v1/jobs/batch |
| Subscribable | yes: as often as every 3600 seconds, firing a webhook only on a change |
Other Instagram endpoints
- /v1/instagram/audio-reels Reels using a sound
- /v1/instagram/comment-replies Replies under one comment
- /v1/instagram/hashtag-posts Posts under a hashtag
- /v1/instagram/highlight Stories inside a highlight
- /v1/instagram/popular-search Top posts for a keyword
- /v1/instagram/post Post or reel details
- /v1/instagram/post-comments Comments on a post or reel
- /v1/instagram/profile Profile details