Skip to content
API reference / Tennis
GET/tennis/h2h/{a}/{b}

Tennis head-to-head

Player a's record against player b: wins and earlier meetings (latest first, scores in sets). Totals are the provider's whole history when it was read (before an ATP or WTA singles match between the two), else our stored meetings.

In the plans that cover this sportPay per call without a key: $0.005 in USDC

Parameters

  • ainteger · pathrequired

    Player ID

  • binteger · pathrequired

    Other player ID

Response

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

  • dataobject
  • matchesinteger
  • meetingsarray of object

    latest first

  • datestring

    YYYY-MM-DD

  • match_idinteger
  • score_ainteger
  • score_binteger
  • tournamentstring
  • winner_idinteger
  • player_aobject
  • idinteger
  • namestring
  • winsinteger
  • player_bobject
  • idinteger
  • namestring
  • winsinteger
  • sourcestring

    Source of the totals: the data provider (its whole history, read before a coming ATP or WTA match) or ours (the meetings listed).

  • 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.
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?