> For the complete documentation index, see [llms.txt](https://docs.sprinto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinto.com/api-references/getting-started/pagination.md).

# Pagination

The Sprinto Developer API uses **cursor-based pagination** to help you efficiently work with large datasets. Pagination allows you to fetch smaller, manageable subsets of data, improving response time and overall API performance.

Sprinto’s pagination model aligns with the **Relay Cursor Pagination specification**, making it predictable and easy to work with in GraphQL-based integrations.

For a hands-on experience, Sprinto recommends using the API Playground to explore paginated queries interactively.

***

### Important notes

* The Sprinto Developer API is currently in beta, and pagination behaviour may evolve as new features are introduced.
* API requests are rate-limited to **10 requests per minute**. Exceeding this limit results in an error response.
* Pagination parameters and response structures are enforced at the schema level.

***

### Pagination model

Sprinto uses **cursor-based pagination**, where each record is associated with a unique cursor. Instead of relying on page numbers, cursors allow you to reliably navigate forward and backward through a dataset.

This approach ensures consistency even when underlying data changes.

***

### Supported pagination arguments

The following pagination arguments are supported across paginated queries.

<table><thead><tr><th width="111.86328125">Argument</th><th>Description</th></tr></thead><tbody><tr><td><code>first</code></td><td>Specifies the number of records to fetch in a single request.</td></tr><tr><td><code>after</code></td><td>Fetches records that appear after the specified cursor. Used for forward navigation.</td></tr><tr><td><code>before</code></td><td>Fetches records that appear before the specified cursor. Used for backward navigation.</td></tr></tbody></table>

***

### Pagination response structure

Paginated responses follow a consistent structure based on connections and edges.

<table><thead><tr><th width="132.2734375">Field</th><th width="520.70703125">Description</th></tr></thead><tbody><tr><td><code>edges</code></td><td>A list representing individual records in the result set.</td></tr><tr><td><code>cursor</code></td><td>A unique identifier for each edge, used for pagination navigation.</td></tr><tr><td><code>node</code></td><td>The actual data object returned by the API.</td></tr><tr><td><code>totalCount</code></td><td>The total number of records available for the query.</td></tr></tbody></table>

***

### Example: Paginated query

The following example retrieves the first five workflow checks that appear after a specific cursor.

{% tabs %}
{% tab title="Query" %}

```javascript
query WorkflowChecksPaginated($first: Int, $after: String) {
  workflowChecksPaginated(first: 5, after: "dfsdfdscdsfsadcdsafasdcdsfcddsfc--00fdc") {
    edges {
      cursor
      node {
        title
      }
    }
    totalCount
  }
}
```

{% endtab %}

{% tab title="Response" %}

```python
{
  "data": {
    "workflowChecksPaginated": {
      "edges": [
        {
          "cursor": "dsfasfsdfewrfdcdGRFGVSAVS=CV==",
          "node": {
            "title": "Periodic review of the users having access to Lokmat"
          }
        }
        // ... additional workflow checks
      ],
      "totalCount": 110
    }
  }
}
```

{% endtab %}
{% endtabs %}

***

### How pagination works in practice

1. Use the `first` argument to define how many records you want to retrieve.
2. Extract the `cursor` value from the last edge in the response.
3. Pass that cursor value as the `after` argument in the next request to fetch the next set of records.
4. Repeat the process until all required records are retrieved.

For backward navigation, use the `before` argument with the cursor from the first edge in the current response.

***

### Next steps

After understanding pagination, you can:

* Combine pagination with filters and arguments for more precise queries
* Use pagination consistently when building reports or dashboards
* Explore paginated queries directly in the API Playground


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sprinto.com/api-references/getting-started/pagination.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
