Skip to content

Post Count

GET/v1/instagram/profile/post-count1 credit

Returns the total number of posts an account has published.

01Query parameters

NameTypeDescription
handlerequiredstringInstagram username. A leading `@` or a full profile URL is also accepted.
allow_estimatedoptionalbooleanSet to `true` to accept a rounded count (e.g. 32000 for "32K") when Instagram shows only an abbreviated number.Default: false

02Request

curl "https://api.scrapesocial.ai/v1/instagram/profile/post-count?handle=zuck" \
  -H "x-api-key: $SCRAPESOCIAL_KEY"

03Responses

Real answers from the API. Lists are shortened to 2 items.

GET /v1/instagram/profile/post-count?handle=zuck

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "handle": "zuck",
  "media_count": 446,
  "is_estimated": false
}

Common to every endpoint

Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.

GET /v1/cosmos/profile?handle=design

{
  "success": false,
  "message": "Invalid API key"
}

04Notes

The answer has `handle`, `media_count` and `is_estimated`. Instagram abbreviates counts above 10,000 posts; for such an account without `allow_estimated=true` the call is a free 422 (`post_count_precision_unavailable`), with it the estimate comes back and `is_estimated` is true. An unknown handle is a free 404.

05Errors & credits

Every error has success: false, a real HTTP status and costs no credits.

  • 400missing_parameter

    A required parameter is missing or invalid.

  • 403private_account

    The account is private or age-restricted.

  • 404not_found

    No such account.

  • 503upstream_error

    The platform did not answer; retry shortly.