Skip to content

Livematches in play

Demo: Matchboard, opens in a new tab
Docs v2

Fixtures

Head to head

GET

/v2/fixtures/{id}/h2h

All plans

View as MarkdownTry in Playground →

The two teams’ head-to-head record as the source tallies it, seen from this fixture’s home / away point of view, over their recent meetings (around the last ten) plus this fixture once it has finished. For the full list of meetings, call /v2/fixtures/{id}/h2h/fixtures.

If the teams have no recorded meeting, data is null rather than a 0/0/0 record. managerDuel gives the two managers’ personal record against each other, counting every team they have managed; it is null if they have never faced each other and in sports that have no managers.

Parameters

id

pathrequired

fixture id issued by DataSportsAPI, a positive integer

Response

data
H2H | null

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"
Example
{ "data": { "homeWins": 3, "draws": 4, "awayWins": 3,
    "managerDuel": { "homeManager": { "id": 912044, "name": "Fabian Hurzeler", "slug": "fabian-hurzeler", "shortName": "F. Hurzeler",
                                     "image": "https://cdn.datasportsapi.com/v2/managers/912044/photo" },
                     "awayManager": { "id": 912045, "name": "Pierre Sage", "slug": "pierre-sage", "shortName": "P. Sage", "image": null },
                     "homeWins": 1, "draws": 0, "awayWins": 0 } } }