Skip to content
datasportsAPI

FixturesHead to head

Documentation

/

Type to filter the docs by title or path.

FixturesEndpoint 10 of 116

Head to head

GET

/v2/fixtures/{id}/h2h

Plan
All plans
Auth
Bearer dsa_live_…
Parameters
1 required · 0 optional
Returns
H2H | null

The two teams’ head-to-head record as tallied by the source, seen from this fixture’s home / away point of view. It covers their recent meetings — typically around the last ten — and includes this fixture once it has finished. For the full list of meetings, call /v2/fixtures/{id}/h2h/fixtures.

Worth knowing

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.

01Parameters

  • idpathRequired

    fixture 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"

03Response

The top-level keys of the JSON body. Each object links to its full shape in the data reference.

data
H2H | null
ObjectsH2H
Example response
{ "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 } } }

04Errors

Nothing specific to this endpoint: only the account-wide errors below apply.

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code