Archive API docs
    Jump to

    Narrow by kind with a prefix — q: queries, m: mutations, t: types, g: guides, f: fields and arguments.

    Pagination

    Paginated fields return a connection: a page of records plus information about the next page. Request a page with first and after, then read pageInfo to decide whether to continue. For the connection field tables, see the Pagination reference.

    The cursor loop

    1. Send first to set the page size. Omit after for the first page.
    2. Read the records and pageInfo.hasNextPage.
    3. If hasNextPage is true, send pageInfo.endCursor as after in the next request.
    4. Repeat until hasNextPage is false.

    Keep the workspace, filters, and sort order the same throughout the loop. Treat cursors as opaque strings: copy them from the response without editing or constructing them.

    Select nodes to get the records directly, or edges when you need each node’s cursor. To get the size of the full result set, request totalCount.

    Page-size bounds

    first defaults to 20 and must be between 1 and 100, with two exceptions:

    • engagementHistory accepts up to 1000 snapshots of one item’s metrics per page.
    • operationRecords accepts up to 1000 records per page. An ID-based refetchEngagementBulk operation fits in one maximum-size page. Filter-based refreshes can contain up to 10,000 records and require pagination.

    Archive rejects out-of-range values with a GraphQL error. For example, first: 500 fails on a connection capped at 100; it does not return a smaller page automatically.

    Lists that are not connections

    Some fields return a plain list, including saved views, Collections, and custom-attribute schemas. These fields accept neither first nor after.

    These lists are capped at 1000 rows. When a result is truncated, you get the first 1000 rows in the field’s own order, with no error and no other indication that more rows exist.

    Fields with this cap include collections, contentViews, creatorViews, socialProfileViews, viewGroups, customAttributeSchemas, labels, and webhookSubscriptions. For subscriptions, use webhookSubscriptionsConnection when you need to paginate. Each field’s reference page states its limit.

    Walkthrough

    Paginate items page by page

    Fetch page one, then page two using the returned endCursor.

    Step 1

    query.graphql
    query ItemsPaginationPage1($first: Int) {
      items(first: $first) {
        totalCount
        edges {
          node {
            id
            caption
            takenAt
          }
        }
        pageInfo {
          hasNextPage
          endCursor
        }
      }
    }
    variables.json
    {
      "first": 5
    }
    Headers
    Authorization: Bearer docs_demo_token_0000000000000000000000
    WORKSPACE-ID: 6ccefa76-e8ba-5ab0-9c60-e48a9e235a4a
    200 OK 48 lines
    {
      "data": {
        "items": {
          "totalCount": 30,
          "edges": [
            {
              "node": {
                "id": "452a119f-393e-5edf-a7f7-f563294f3885",
                "caption": "Reel #29 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-30T00:00:00Z"
              }
            },
            {
              "node": {
                "id": "d8a538a5-8857-5c0c-b3fb-a2b83c8d2a0b",
                "caption": "Post #28 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-29T00:00:00Z"
              }
            },
            {
              "node": {
                "id": "330cce49-6139-5672-9c61-33fb35bc73e2",
                "caption": "Short #27 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-28T00:00:00Z"
              }
            },
            {
              "node": {
                "id": "a61d036b-fe79-538c-bbbb-1f97162cab3c",
                "caption": "Story #26 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-27T00:00:00Z"
              }
            },
            {
              "node": {
                "id": "de1860a7-2d98-5eda-8977-116583725c74",
                "caption": "Reel #25 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-26T00:00:00Z"
              }
            }
          ],
          "pageInfo": {
            "hasNextPage": true,
            "endCursor": "Z2lkOi8vYXJjaGl2ZS9JdGVtL2RlMTg2MGE3LTJkOTgtNWVkYS04OTc3LTExNjU4MzcyNWM3NDpXeUpqTVdRNU9UQTVOU0lzV3pFM016STFOemt5TURBd01EQXNJbVJsTVRnMk1HRTNMVEprT1RndE5XVmtZUzA0T1RjM0xURXhOalU0TXpjeU5XTTNOQ0pkWFE="
          }
        }
      }
    }

    Step 2

    query.graphql
    query ItemsPaginationPage2($first: Int, $after: String) {
      items(first: $first, after: $after) {
        edges {
          node {
            id
            caption
            takenAt
          }
        }
        pageInfo {
          hasNextPage
          endCursor
        }
      }
    }
    variables.json
    {
      "first": 5,
      "after": "Z2lkOi8vYXJjaGl2ZS9JdGVtL2RlMTg2MGE3LTJkOTgtNWVkYS04OTc3LTExNjU4MzcyNWM3NDpXeUpqTVdRNU9UQTVOU0lzV3pFM016STFOemt5TURBd01EQXNJbVJsTVRnMk1HRTNMVEprT1RndE5XVmtZUzA0T1RjM0xURXhOalU0TXpjeU5XTTNOQ0pkWFE="
    }
    Headers
    Authorization: Bearer docs_demo_token_0000000000000000000000
    WORKSPACE-ID: 6ccefa76-e8ba-5ab0-9c60-e48a9e235a4a
    200 OK 47 lines
    {
      "data": {
        "items": {
          "edges": [
            {
              "node": {
                "id": "3870b3f7-2066-56c1-b82e-f7c606c863fa",
                "caption": "Post #24 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-25T00:00:00Z"
              }
            },
            {
              "node": {
                "id": "2adb5caf-5619-5fc5-b738-ba264cb394a7",
                "caption": "Short #23 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-24T00:00:00Z"
              }
            },
            {
              "node": {
                "id": "5b570218-bf6a-5e05-9389-2f9bfe7f73ce",
                "caption": "Story #22 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-23T00:00:00Z"
              }
            },
            {
              "node": {
                "id": "24bd35e7-4ae8-546b-bc76-b9cee5e1107f",
                "caption": "Reel #21 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-22T00:00:00Z"
              }
            },
            {
              "node": {
                "id": "5503f877-fd11-5373-b372-ce4738980780",
                "caption": "Post #20 from Northwind Botanicals #northwindbotanicals #plantcare #growwithnorthwind @northwindbotanicals",
                "takenAt": "2024-11-21T00:00:00Z"
              }
            }
          ],
          "pageInfo": {
            "hasNextPage": true,
            "endCursor": "Z2lkOi8vYXJjaGl2ZS9JdGVtLzU1MDNmODc3LWZkMTEtNTM3My1iMzcyLWNlNDczODk4MDc4MDpXeUpqTVdRNU9UQTVOU0lzV3pFM016SXhORGN5TURBd01EQXNJalUxTURObU9EYzNMV1prTVRFdE5UTTNNeTFpTXpjeUxXTmxORGN6T0RrNE1EYzRNQ0pkWFE="
          }
        }
      }
    }

    For the connection and PageInfo field tables, see the Pagination reference.