Skip to content

Pagination

List endpoints (comments, channel posts/videos, tweets, search) return a page of items and a meta object. When another page exists, meta carries an opaque next_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, "next_cursor": "eyJvZmZzZXQiOjUwfQ" },
"request_id": "req_01JZX4M8Q2TE9W"
}

Pass meta.next_cursor back as ?cursor= to get the next page. When next_cursor is absent, you have the last page. Not every list endpoint pages: some return a single batch (up to limit) and never include a cursor. 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"]
cursor = r.get("meta", {}).get("next_cursor")
if not cursor:
break
params["cursor"] = cursor

Billing and limits

  • Credits are charged per item returned: a page of 50 comments at 1 credit each is 50 credits.
  • Keep limit at 50 or lower. That is the most a single synchronous response returns; page with the cursor for more.
  • On the free trial, limit is capped at 5 items a call; the response carries X-Limit-Capped when it was lowered.
  • Page 1 of a list is cached more briefly than deeper pages, so fresh content shows up quickly. See Caching & freshness.

Next: Field projection · Rate limits