FixturesEndpoint 11 of 116
Head-to-head fixtures
https://api.datasportsapi.com/
- Plan
- All plans
- Auth
Bearer dsa_live_…- Parameters
- 1 required · 0 optional
- Returns
Fixture[]
Past and scheduled meetings of the two teams, returned as fixtures sorted by kick-off (oldest first); the fixture you asked about is excluded.
Worth knowing
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.
01Parameters
idpathRequiredfixture id issued by DataSportsAPI, a positive integer
02Request
The same call from the command line and each SDK. The SDK lines assume a client created with your key; left out, it is read from DATASPORTSAPI_API_KEY. Installing a client: SDKs & CLI.
curl -H "Authorization: Bearer dsa_live_…" \
"https://api.datasportsapi.com/v2/fixtures/{id}/h2h/fixtures"03Response
The top-level keys of the JSON body. Each object links to its full shape in the data reference.
dataFixture[]meta- count, and historyFrom if your plan caused older meetings to be dropped
{ "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 } }04Errors
- 403
history_not_in_plankick-off falls before the start of your plan’s history window
unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code