Skip to content
API reference / Soccer
GET/rugby/h2h/{a}/{b}

Head-to-head of two teams (all competitions)

Insights plan feature (403 FEATURE_NOT_IN_PLAN without it). Every meeting of two teams in our data (friendlies left out), any team sport with results: won, drawn and lost from team a's side (home_team_* = team a, away_team_* = team b), goals (the sport's score: points, runs, sets won in volleyball, maps in esports), each side's biggest win (largest margin), the last 5 meetings, and history_from (our data starts there: nothing is claimed before). Meetings without a result are counted apart. With sentences (lang de, es, it, fr). Facts only. Tennis: /tennis/h2h/{a}/{b} (players).

In preview, not in plans yetPay per call without a key: $0.02 in USDC

Parameters

  • ainteger · pathrequired

    Team A ID

  • binteger · pathrequired

    Team B ID

  • langstring · query

    Language of sentences and names: de, es, it, fr

Response

JSON with success, the result in data, and where the endpoint pages its results meta.

  • dataobject
  • factsarray of object
  • based_onarray of integer
  • history_fromstring
  • importanceinteger
  • incompleteboolean

    a match without a result cuts it: no sentence

  • opponentobject
  • player_idinteger
  • sincestring
  • teamobject
  • team_idinteger

    Flat fields for consumers that do not read values: the team's and player's id, the fact's main number, the day a run or "first since" reaches back to, and the start of our data (no claim reaches further).

  • textstring
  • typestring
  • valueinteger
  • valuesobject
  • head_to_headobject

    home_team = team_a, away_team = team_b

  • away_team_goalsinteger
  • away_team_winsinteger
  • biggest_away_team_winobject
  • biggest_home_team_winobject
  • drawsinteger
  • history_fromstring

    our results start here: no claim reaches further back

  • home_team_goalsinteger

    Goals over the counted meetings, and each side's biggest win (largest margin, the latest of equal ones; a shoot-out is no win).

  • home_team_winsinteger
  • meetingsarray of object

    latest first, at most 5

  • meetings_without_resultinteger

    Meetings in the past without a result: the counts leave them out, so a summary is incomplete; LatestMissing: the most recent one is among them.

  • playedinteger

    all meetings in our data

  • team_aobject
  • idinteger
  • namestring
  • team_bobject
  • idinteger
  • namestring
  • errorobject
  • codestring
  • messagestring
  • metaobject
  • attributionstring

    Attribution a data source's licence asks for (Cricsheet's history).

  • limitinteger
  • offsetinteger
  • totalinteger
  • successboolean

Errors

StatusCodeWhen
400INVALID_PARAMA parameter is missing or wrong, and the message names it. Fix the request; do not retry it.
402x402 offersNo key and no valid payment: the body lists what to pay. Only a 200 answer is charged.
403FORBIDDENThe sport or feature is not in your plan (FEATURE_NOT_IN_PLAN for Insights and other plan features).
404NOT_FOUNDNo record with that id.

All errors have the shape described in Errors and limits.

Generated from the OpenAPI file, version 1.0. See it as JSON

Was this page helpful?