Skip to content

Pagination

List endpoints (comments, channel posts/videos, tweets, search) paginate with an opaque cursor:

Terminal window
curl "https://api.scrapersocial.com/v1/instagram/comments?url=https://www.instagram.com/reel/C8xQvZ2sVAb/&limit=50" \
-H "Authorization: Bearer sk_live_..."
{
"data": [{ "id": "c_9021", "text": "This fixed it for me, thank you" }],
"meta": { "count": 50, "limit": 50, "cursor": "eyJvZmZzZXQiOjUwfQ", "has_more": true },
"request_id": "req_01JZX4M8Q2TE9W"
}

Pass meta.cursor back as ?cursor= to get the next page. Cursors are opaque and short-lived — don’t store them long-term.

Walking every page

import httpx
params = {"url": post_url, "limit": 50}
items = []
while True:
r = httpx.get("https://api.scrapersocial.com/v1/instagram/comments",
params=params, headers=headers, timeout=120).json()
items += r["data"]
if not r["meta"]["has_more"]:
break
params["cursor"] = r["meta"]["cursor"]

Billing and limits

  • Credits are charged per item returned: a page of 50 comments at 3 credits each is 150 credits.
  • limit maxes out at 50 for synchronous calls. For more per request, use async jobs — request limit above 50 and the API returns a job.
  • Page 1 of a list is cached more briefly than deeper pages, so fresh content shows up quickly. See Caching & freshness.

Next: Async jobs · Field projection