Head-to-head fixtures
GET
/
View as MarkdownTry in Playground →
Past and scheduled meetings of the two teams, returned as fixtures sorted by kick-off (oldest first); the fixture you asked about is excluded.
Each item carries all Fixture fields in their list form, so those only /v2/fixtures/{id} fills (referee and the like) are null. Meetings from before your plan’s history window are omitted, with meta.historyFrom giving the first day included. Teams that have never met produce an empty array.
Parameters
idpathrequired
fixture id issued by DataSportsAPI, a positive integer
Response
- data
Fixture[]- meta
- count, and historyFrom if your plan caused older meetings to be dropped
- errors
- 403
history_not_in_plan— kick-off falls before the start of your plan’s history window
Any /v2 call can also come back with one of the common errors.
curl -H "Authorization: Bearer sk_live_…" \
"https://api.datasportsapi.com/v2/fixtures/{id}/h2h/fixtures"Example
{ "data": [ { "id": 456, "sport": "football", "startTime": "2015-09-19T14:00:00.000Z",
"status": { "type": "finished", "phase": "finished", "code": 100, "description": "Ended", "period": null, "finish": "regular" },
"home": { "id": 3758, "name": "Arsenal", … }, "away": { "id": 17000, "name": "Nottingham Forest", … },
"homeScore": { "current": 2, … }, "awayScore": { "current": 0, … }, "winner": "home", … }, … ],
"meta": { "count": 7 } }