← Back to Dashboard

Pagination

Cursor-based pagination for list endpoints.

List endpoints return results newest-first with cursor-based pagination.

How It Works

  1. Request with optional limit (default 50, max 100)
  2. Check meta.has_more
  3. Pass meta.next_cursor as cursor in next request
  4. Repeat until has_more is false

Example

First Page

curl "https://symagedocs.ai/api/v1/jobs?limit=10" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
{{
  "data": [ ... ],
  "meta": {{
    "count": 10,
    "has_more": true,
    "next_cursor": "2026-03-24T11:30:00+00:00"
  }}
}}

Next Page

curl "https://symagedocs.ai/api/v1/jobs?limit=10&cursor=2026-03-24T11:30:00+00:00" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
TipDon't construct cursors manually — always use the exact next_cursor from the response.

Collect All Results

import httpx

def get_all_jobs(api_key):
    headers = {{"Authorization": f"Bearer {{api_key}}"}}
    all_jobs, cursor = [], None

    while True:
        params = {{"limit": 100}}
        if cursor:
            params["cursor"] = cursor
        body = httpx.get("https://symagedocs.ai/api/v1/jobs",
                         headers=headers, params=params).json()
        all_jobs.extend(body["data"])
        if not body["meta"].get("has_more"):
            break
        cursor = body["meta"]["next_cursor"]
    return all_jobs