Documentation / Guides

Pagination

Lists come back a page at a time. Two ways to move through them.

Pages

Most lists return 50 rows by default. Ask for up to 200 with per_page, and move with page. The first page's meta tells you total and total_pages.

curl
curl "https://api.tabletennisapi.com/v1/matches?date=2026-09-28&per_page=200&page=2" \
  -H "Authorization: Bearer $TT_KEY"

Cursors

Long histories, such as a player's matches, use a cursor instead. When there is more, meta.next_cursor is set: pass it back as cursor exactly as given. When it is null you have everything.

Python
cursor = None
while True:
    params = {"cursor": cursor} if cursor else {}
    res = get("/v1/players/pl_51t63nz3/matches", params)
    rows += res["data"]
    cursor = res["meta"]["next_cursor"]
    if not cursor: break
per_page outside 1 to 200, or a changed cursor, is refused with 400 bad_request.