# Pagination

Endpoints that return a list of resources are paginated if results exceed the maximum length defined for the endpoint. Dor uses a cursor-based pagination strategy for all list endpoints.

The `next` key in the `meta` response object will either be NULL or contain a link. If it is NULL, there are no additional results available for your query. If it contains a link, follow the link for the next page of results for your query. Continue following the `next` link returned with each subsequent request to fetch all available results.

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

```json
"data": [
    {...},
    {...}
],
"meta": {
    "limit": 100,
    "next": "https://api.getdor.com/v2/locations?next=2lkj23jf2fljf29"
}    
```

{% endtab %}
{% endtabs %}

<br>


---

# Agent Instructions: 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:

```
GET https://docs.getdor.com/dtm-docs/dtm-api/pagination.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
