LogoLogo
Quick StartFootball APIContactAPI 3.0
  • Welcome
  • Changelog
  • Getting Started
    • Get Started
    • Documentation for the documentation
  • Endpoint overview
    • Continents
      • GET All Continents
      • GET Continent by ID
    • Countries
      • GET All Countries
      • GET Country by ID
    • Leagues
      • GET All Leagues
      • GET League by ID
      • GET Leagues by Country ID
      • Search Leagues by Name
    • Seasons
      • GET All Seasons
      • GET Season by ID
    • Fixtures
      • GET Fixture by ID
      • GET Last Updated Fixtures
      • GET Fixtures by Date
      • GET Fixtures by Date Range
      • GET Fixtures by Date Range for Team
      • GET Fixtures by Multiple ID's
      • GET Deleted Fixtures
    • Statistics
    • Livescores
      • GET All Livescores
      • GET All In play Livescores
    • News API
      • GET All News
      • GET News For Upcoming Fixtures
      • GET News by Season ID
    • Commentaries
      • Commentaries by Fixture ID
    • Video Highlights
      • Get Video Highlights by Fixture ID
    • Head 2 Head
      • GET Head 2 Head by Team IDs
    • Standings
      • GET Standings by Season ID
      • GET LIVE Standings
      • GET Standings by Season ID and Round ID
      • GET Standings by Season and Date(time)
      • GET Standings Corrections by Season ID
    • Teams
      • GET Team by ID
      • GET Teams by Country ID
      • GET Teams by Season ID
      • Search Team by Name
      • GET Current Leagues by Team ID
      • Get All Leagues by Team ID
    • Players
      • GET Player by ID
      • GET Players by Country ID
      • Search Player by Name
    • Topscorers
      • GET Topscorers by Season ID
      • GET Topscorers Aggregated by Season ID
    • Rivals
      • GET Rivals by Team ID
    • Venues
      • GET Venue by ID
      • GET Venues by Season ID
    • Rounds
      • GET Rounds by Season ID
      • GET Round by ID
    • Odds
      • GET Odds by Fixture ID and Bookmaker ID
      • GET Odds by Fixture ID and Market ID
      • GET Odds by Fixture ID
      • GET Inplay Odds by Fixture ID
    • Coaches
      • GET Coach by ID
    • Stages
      • GET Stage by ID
      • GET Stages by Season ID
    • Bookmakers
      • GET All Bookmakers by Fixture ID
      • GET All Bookmakers
      • GET Bookmaker by ID
    • Markets
      • GET All Fixtures by Market ID
      • GET All Markets
      • GET Market by ID
    • Team Squads
      • GET Team Squad by Team and Season ID
    • TV Stations
      • GET TV Station by Fixture ID
    • Prediction API
      • GET Leagues and Performances
      • GET Probabilities
      • GET Probabilities by Fixture ID
      • GET Value Bets
      • GET Value Bet by Fixture ID
  • Tutorials
    • Introduction to our API
      • Make your first request
      • Set your time zone
      • Pagination
    • Enriching your response
      • Includes
      • Nested includes
    • Filtering, limiting & sorting
      • Filtering
      • Limiting
      • Sorting
    • Schedule, fixtures & livescores
      • Season schedule
      • Fixtures
      • Livescores
    • Statistics
      • Match statistics
      • Team statistics
      • Player statistics
      • Season statistics
    • League & topscorers standings
      • League standings
      • Topscorers standings
    • Odds & predictions
      • Odds
        • Odds by fixture, bookmaker and market id
        • FlatOdds
        • InplayOdds
      • Predictions
  • MySportmonks
    • How-to build a custom plan
    • ID Finder
  • How-to Guides
    • Get Started with our how-to guides
      • How-to build your API requests
    • Livescores & fixtures
      • How-to build a livescore website
      • How-to build a schedule page
    • Match & team pages
      • How-to build a match page with events and statistics
      • How-to build a match page with line-ups/formations
      • How-to build a team page with season stats and squads
    • How-to build standings and topscorer standings
      • League standings
      • Topscorer standings
    • Odds & predictions
      • How-to build a match page with odds
      • How-to build a betting odds portal
      • How-to use the predictions API
    • How-to build a fantasy game
    • Developer tools
      • How-to use Sportmonks' APIs in Postman
    • How-to keep your database in sync
    • World Cup 2022
    • EURO 2024
    • Football widgets
      • How-to set up football widgets in your web application
      • Configurations
      • Widgets overview
        • Livescore widget
        • International Cup widgets
  • API References
    • API reference guide
    • Data features
    • ID Finder
    • Code libraries
    • Demo response files
    • Statuses and definitions
    • API Rate limiting
    • Response codes
    • Meta description
  • General
  • Sportmonks
  • Plans & pricing
  • FAQ
  • Contact
Powered by GitBook
On this page
  • Create your request
  • Request more or fewer results per page

Was this helpful?

Export as PDF
  1. Tutorials
  2. Introduction to our API

Pagination

PreviousSet your time zoneNextEnriching your response

Last updated 2 years ago

Was this helpful?

In the previous tutorial, we discussed how you can set your desired . 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?”

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.

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.

Create your request

Let's request all the fixtures between two dates. We can do this by using our . In the of the response, you will see information about your subscription, the number of API calls and more. Please refer to our for more info.

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.

https://soccer.sportmonks.com/api/v2.0/fixtures/between/2019-11-10/2019-12-12?api_token={API_TOKEN}
    "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"
            }
        }
    }

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

"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.

https://soccer.sportmonks.com/api/v2.0/fixtures/between/2019-11-10/2019-12-12?api_token={API_TOKEN}&page=2
    "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"
            }
        }
    }

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

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:

https://soccer.sportmonks.com/api/v2.0/fixtures/between/2019-11-10/2019-12-12?api_token={API_TOKEN}&per_page=110
    "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"
            }
        }
    }

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

Just like before, the meta description changes accordingly.

For an overview of which endpoints support pagination, please refer to our

Note that including a substantial amount of relationships might result in failed responses due to memory limits.

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.

Now that you know all about pagination, we can explore our API’s endless possibilities with the next chapter:

timezone
get fixtures by date range endpoint
meta description
meta description page
API Reference Guide.
enriching your response.