Endpoint
GET /api/v1/{sport}/h2h/{id1}/{id2} (recommended — routes through the correct sport host).
Example: Real Madrid vs FC Barcelona
Resolving team IDs first
If you don’t already know the IDs, run Search and grabcompetitors[].id:
Common patterns
- Pre-match widget — fetch H2H + last 5 results for each side (
/competitor/{id}/results). - Streak detection — walk
games[]and count consecutiveisWinneron one side. - Cross-competition — H2H spans every competition both teams have ever met in. Group by
competitionDisplayNameif you only want league meetings.
Related
- Teams — single-team schedule.
- Game Detail — open any returned game ID.