Head to head
A full rivalry: the record, each player's averages across their meetings, the form and the biggest wins, with the meetings paged.
The call
The address follows the form below
GET
https://api.dartsapi.com/v1/head-to-head
Try it
Sent from your browser straight to the API, with your keyYour keyPaste it once, kept in this browser
Kept in this browser as
dartsapi.com.api_key, so every docs page has it. Get a free key and it is put here for you.Ctrl + Enter runs it
Run it to see your limits
Parameters
All in the query string| Name | Type | What it does |
|---|---|---|
player_id required | id | A player, as pl_ followed by six characters. |
opponent_id required | id | The other player, as pl_ followed by six characters. |
from | date | Earliest date to include, YYYY-MM-DD. |
to | date | Latest date to include, YYYY-MM-DD. |
limit | int | How many to return. Default 50, at most 200. |
cursor | cursor | Carry on from here: pass back meta.next_cursor exactly as it came. |
Returns
In data, read from a real response| Field | Type | Example |
|---|---|---|
players | list | 2 items |
meetings | number | 39 |
first_meeting | date | "2024-01-03" |
last_meeting | date | "2026-09-06" |
matches | list | 3 items |
meta.next_cursor | string | Pass back as cursor for the next page; null on the last |
When it refuses
Every error code| Status | Code | When |
|---|---|---|
| 401 | no_key | No key, a malformed key, or one that is not ours. |
| 402 | outside_window | Dates outside your plan's window. The answer names the plan that reaches them. |
| 422 | bad_parameter | A parameter is malformed or out of range, named in the message. |
| 429 | rate_limited | Over your rate a minute. Retry-After says when. |
| 429 | allowance_used | The day's or month's allowance is used. The answer names the plan with a larger one. |