API Sports Football Get Fixture Head To Head

1 credits/call
ae_api_sports_football_get_fixture_head_to_head

View the head-to-head match history between two football teams via API-Sports.

Entertainment
1 credits/call

Pricing

1 credits/call
ConditionCharge
Each call1 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
tostringNoFilter by to.—
h2hstringYesFilter by h2h.—
datestringNoFilter by date.—
fromstringNoFilter by from.—
lastintegerNoReturn the last N results. API-Sports Football free plans do not have access to this parameter; use id, date, from/to, league+season+round, or omit last on free keys.—
nextintegerNoFilter by next.—
venueintegerNoFilter by venue.—
leagueintegerNoFilter by league.—
seasonintegerNoFilter by season.—
statusenum (NS | FT | HT)NoFilter by status.—
timezonestringNoFilter by timezone.—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_api_sports_football_get_fixture_head_to_head' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "from": "2023-01-01",
    "h2h": "197-569",
    "timezone": "Asia/Shanghai",
    "to": "2026-11-06"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "errors": [],
  "get": "fixtures/headtohead",
  "paging": {
    "current": 1,
    "total": 1
  },
  "parameters": {
    "from": "2023-01-01",
    "h2h": "197-569",
    "timezone": "Asia/Shanghai",
    "to": "2026-11-06"
  },
  "response": [
    {
      "fixture": {
        "date": "2024-07-13T19:00:00+08:00",
        "id": 1207124,
        "periods": {
          "first": 1720868400,
          "second": 1720872000
        },
        "referee": null,
        "status": {
          "elapsed": 90,
          "extra": null,
          "long": "Match Finished",
          "short": "FT"
        },
        "timestamp": 1720868400
      },
      "goals": {
        "away": 1,
        "home": 1
      },
      "league": {
        "country": "World",
        "flag": null,
        "id": 667,
        "logo": "https://media.api-sports.io/football/leagues/667.png",
        "name": "Friendlies Clubs",
        "round": "Club Friendlies 1"
      },
      "score": {
        "extratime": {
          "away": null,
          "home": null
        },
        "fulltime": {
          "away": 1,
          "home": 1
        },
        "halftime": {
          "away": 0,
          "home": 0
        },
        "penalty": {
          "away": null,
          "home": null
        }
      },
      "teams": {
        "away": {
          "id": 569,
          "logo": "https://media.api-sports.io/football/teams/569.png",
          "name": "Club Brugge KV",
          "winner": null
        },
        "home": {
          "id": 197,
          "logo": "https://media.api-sports.io/football/teams/197.png",
          "name": "PSV Eindhoven",
          "winner": null
        }
      }
    }
  ],
  "results": 2
}

This example shows part of the response. Copied content is valid JSON.