# Pagination

In the previous tutorial, we discussed how you can set your desired [**timezone**](/v2/tutorials/the-basics/time-zone.md)**.** Before we dive into the extra details of our API, we need to discuss one of the fundamentals of our API: **pagination.**

*“How is it possible that I cannot find all the data I requested?”*&#x20;

Responses sometimes return more than 1.000 results. With that much data, requests can become slow and hard to work with. That’s why these endpoints use something called pagination. Instead of returning all 1.000+ results, you'll get a hundred results per page.&#x20;

{% hint style="info" %}
Note that every page called counts against the ratelimiter. So a call to page 1,2,3,4 and 5 counts as 5 call against the ratelimiter.
{% endhint %}

## Create your request

Let's request all the fixtures between two dates. We can do this by using our [**get fixtures by date range endpoint**](https://football-postman.sportmonks.com/#3ea72840-e3b7-48fe-9034-3a2132885ce8). In the [**meta description**](/v2/api-references/meta-description.md) of the response, you will see information about your subscription, the number of API calls and more. Please refer to our [**meta description page**](/v2/api-references/meta-description.md) for more info. &#x20;

Also, you can see information about the results of the response. **In the second tab,** you can see that the response returned 13454 results, but the API only shows a hundred results per page. With pagination, it results in 135 pages.

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

```javascript
https://soccer.sportmonks.com/api/v2.0/fixtures/between/2019-11-10/2019-12-12?api_token={API_TOKEN}
```

{% endtab %}

{% tab title="Response" %}

```javascript
    "pagination": {
            "total": 13454,
            "count": 100,
            "per_page": 100,
            "current_page": 1,
            "total_pages": 135,
            "links": {
                "next": "https://soccer.sportmonks.com/api/v2.0/fixtures/between/2019-11-10/2019-12-12?page=2"
            }
        }
    }
```

{% endtab %}

{% tab title="Field Description" %}

| Field          | Description                                                       |
| -------------- | ----------------------------------------------------------------- |
| `pagination`   | Opens an array of information about the pages in the API response |
| `total`        | The total amount of results the API returns                       |
| `count`        | The amount of results on the current page                         |
| `per_page`     | The amount of results per page                                    |
| `current_page` | The number of page currently browsed                              |
| `total_pages`  | The total number of pages                                         |
| `links`        | The link if you want to go to the next API page                   |
| {% endtab %}   |                                                                   |
| {% endtabs %}  |                                                                   |

*"So, how do I get to the second page then?’"*

Excellent question. Going to the second page is easy! Simply add `&page=2` to your request. In the **second tab**, you will see that the meta description changes accordingly.

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

```javascript
https://soccer.sportmonks.com/api/v2.0/fixtures/between/2019-11-10/2019-12-12?api_token={API_TOKEN}&page=2
```

{% endtab %}

{% tab title="Response" %}

```javascript
    "pagination": {
            "total": 13454,
            "count": 100,
            "per_page": 100,
            "current_page": 2,
            "total_pages": 135,
            "links": {
                "next": "https://soccer.sportmonks.com/api/v2.0/fixtures/between/2019-11-10/2019-12-12?page=3"
            }
        }
    }
```

{% endtab %}

{% tab title="Field description" %}

| Field          | Description                                                       |
| -------------- | ----------------------------------------------------------------- |
| `pagination`   | Opens an array of information about the pages in the API response |
| `total`        | The total amount of results the API returns                       |
| `count`        | The number of results on the current page                         |
| `per_page`     | The number of results per page                                    |
| `current_page` | The number of pages currently browsed                             |
| `total_pages`  | The total number of pages                                         |
| `links`        | The link if you want to go to the next API page                   |
| {% endtab %}   |                                                                   |
| {% endtabs %}  |                                                                   |

## Request more or fewer results per page

Do you want the API to return more or fewer results per page? That’s also possible! You can determine the number of results per page (range 10-150) by adding `&per_page= {number}` to your request. For example, if you want 110 results per page:<br>

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

```javascript
https://soccer.sportmonks.com/api/v2.0/fixtures/between/2019-11-10/2019-12-12?api_token={API_TOKEN}&per_page=110
```

{% endtab %}

{% tab title="Response" %}

```javascript
    "pagination": {
            "total": 13454,
            "count": 110,
            "per_page": 110,
            "current_page": 2,
            "total_pages": 135,
            "links": {
                "next": "https://soccer.sportmonks.com/api/v2.0/fixtures/between/2019-11-10/2019-12-12?page=3"
            }
        }
    }
```

{% endtab %}

{% tab title="Field description" %}

| Field          | Description                                                       |
| -------------- | ----------------------------------------------------------------- |
| `pagination`   | Opens an array of information about the pages in the API response |
| `total`        | The total amount of results the API returns                       |
| `count`        | The amount of results on the current page                         |
| `per_page`     | The amount of results per page                                    |
| `current_page` | The number of page currently browsed                              |
| `total_pages`  | The total number of pages                                         |
| `links`        | The link if you want to go to the next API page                   |
| {% endtab %}   |                                                                   |
| {% endtabs %}  |                                                                   |

Just like before, the meta description changes accordingly.&#x20;

For an overview of which endpoints support pagination, please refer to our [**API Reference Guide.**](https://football-postman.sportmonks.com/)

{% hint style="danger" %}
**Note** that including a substantial amount of relationships might result in failed responses due to memory limits.&#x20;

We need to protect the uptime of our API and therefore, you might hit the memory limit of 2GB when requesting too much data at a time.
{% endhint %}

Now that you know all about pagination, we can explore our API’s endless possibilities with the next chapter: [**enriching your response.**](/v2/tutorials/enriching-your-response.md)


---

# 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.sportmonks.com/v2/tutorials/the-basics/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.
