HORSERACINGAPI --:--:-- UTC Sign inFree key

Documentation / Guides

Pagination

Pages on lists of known length, a cursor on searches.

Pages

Lists of known length (results by day, meetings, courses) take page and per_page. The first answer's meta carries count, page, per_page, total, total_pages, next_page and prev_page (null at the ends).

curl "https://api.horseracingapi.org/v1/results/2024-06-01?country=GB&page=2" -H "X-API-Key: hra_live_…"

Cursors

Searches (races, horses, jockeys) take per_page and cursor. Pass meta.next_cursor from one answer as cursor on the next, until it is null. A cursor is ours and opaque: send it as it came.

curl "https://api.horseracingapi.org/v1/races/search?country=IRE&cursor=…" -H "X-API-Key: hra_live_…"

A list with nothing in it is a 200 with count 0, never a 404.