Sofascore APIsofascore.com ↗
Access Sofascore head-to-head stats, daily schedules, and ranked H2H streaks across football, basketball, tennis, and 8 more sports via 5 endpoints.
What is the Sofascore API?
This API exposes 5 endpoints covering Sofascore event schedules and head-to-head statistics across up to 9 sports. Use get_daily_events to pull every scheduled match for a given date, then drill into any matchup with get_event_h2h for win/draw/loss splits, manager duel records, and pregame form ratings. The get_h2h_streaks_ranked endpoint aggregates and filters all H2H metrics by configurable percentage thresholds, surfacing historically consistent patterns across a full day of fixtures.
curl -X GET 'https://api.parse.bot/scraper/ca85c1b5-deac-4378-826d-742eddac6785/get_h2h_streaks_ranked?date=2026-07-11&sports=football&max_events=3&min_meetings=3&max_percentage=100&min_percentage=50' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace sofascore-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.sofascore_h2h_statistics_api import Sofascore, Sport, Event, EventNotFound
sofascore = Sofascore()
# List today's football events
for event in sofascore.events.list(sports=Sport.FOOTBALL):
print(event.home_team, "vs", event.away_team, event.status_type)
break
# Construct an event by ID and get H2H statistics
match = sofascore.event(event_id=16264088)
h2h = match.h2h()
print(h2h.home_team, "vs", h2h.away_team)
print(h2h.team_duel.home_wins, h2h.team_duel.draws, h2h.team_duel.away_wins)
for fact in h2h.fun_facts:
print(fact.text, fact.highlighted)
# Get full event details
detail = match.details()
print(detail.tournament, detail.tournament_category, detail.start_timestamp)
print(detail.home_team.name, detail.home_team.short_name)
print(detail.status.description, detail.status.type)
# Get fun facts
facts_result = match.fun_facts()
print(facts_result.total_facts)
for f in facts_result.facts:
print(f.text, f.highlighted)
# Search for high-percentage H2H streaks across football
for streak in sofascore.events.streaks_ranked(sports=Sport.FOOTBALL, max_events=5, min_percentage=80.0):
print(streak.matchup, streak.metric, streak.percentage, streak.count, streak.total_meetings)
Fetches all daily events across specified sports, extracts H2H statistics for each matchup, computes streak metrics (home win %, away win %, draw %, home unbeaten %, away unbeaten %, manager duel %), and returns only those streaks occurring between min_percentage and max_percentage of the time, ranked in descending order by percentage. Processing many events is slow; use max_events to cap.
| Param | Type | Description |
|---|---|---|
| date | string | Date in YYYY-MM-DD format. Omitting uses today's date. |
| sports | string | Comma-separated sports: football,basketball,tennis,ice-hockey,baseball,handball,rugby,american-football,volleyball,cricket,esports. Omitting queries all sports. |
| max_events | integer | Maximum events to process (0 = all). |
| min_meetings | integer | Minimum number of historical meetings required for a matchup to be included. |
| max_percentage | number | Maximum streak percentage threshold. |
| min_percentage | number | Minimum streak percentage threshold. |
{
"type": "object",
"fields": {
"date": "string, date queried in YYYY-MM-DD format",
"streaks": "array of streak objects with event_id, sport, tournament, category, home_team, away_team, matchup, metric, count, total_meetings, percentage",
"min_meetings": "integer, minimum meetings filter applied",
"events_skipped": "integer, events skipped due to no/insufficient H2H data",
"max_percentage": "number, maximum percentage filter applied",
"min_percentage": "number, minimum percentage filter applied",
"sports_queried": "array of sport name strings",
"events_with_h2h": "integer, events that had H2H data meeting min_meetings",
"events_processed": "integer, events with sufficient H2H data",
"total_events_found": "integer, total events collected across sports",
"total_streaks_found": "integer, number of qualifying streaks"
},
"sample": {
"data": {
"date": "2026-06-10",
"streaks": [
{
"count": 4,
"sport": "football",
"metric": "Almería wins (home)",
"matchup": "Almería vs CD Castellón",
"category": "Spain",
"event_id": 16264088,
"away_team": "CD Castellón",
"home_team": "Almería",
"percentage": 50,
"tournament": "LaLiga 2, Promotion Playoffs",
"total_meetings": 8
}
],
"min_meetings": 3,
"events_skipped": 0,
"max_percentage": 100,
"min_percentage": 50,
"sports_queried": [
"football"
],
"events_with_h2h": 3,
"events_processed": 3,
"total_events_found": 3,
"total_streaks_found": 8
},
"status": "success"
}
}About the Sofascore API
Daily Event Coverage
get_daily_events returns a paginated list of all scheduled events for a specified date (defaults to today) across football, basketball, tennis, ice-hockey, baseball, handball, rugby, american-football, and volleyball. Each event object includes event_id, sport, tournament, tournament_category, home_team, home_team_id, away_team, away_team_id, and current score/status fields. The sport_event_counts map lets you see how many events were found per sport at a glance. The event_id values returned here are the primary key for all other endpoints.
Head-to-Head Data
get_event_h2h accepts an event_id and returns a team_duel object containing home_wins, away_wins, draws, and total_meetings. Where available it also returns a manager_duel object with the same shape for the coaches involved, plus a pregame_form object with per-team recent form arrays and ratings. get_event_fun_facts returns an array of text facts each tagged with a highlighted boolean for editorial prominence — note this data is primarily available for football events; other sports typically return no results.
Ranked H2H Streaks
get_h2h_streaks_ranked is the aggregation endpoint. It iterates over all daily events for the given sports and date, computes six metrics per matchup — home win %, away win %, draw %, home unbeaten %, away unbeaten %, and manager duel % — and returns only streaks whose computed percentage falls between min_percentage and max_percentage. You can also set min_meetings to exclude matchups without enough historical data, and max_events to cap processing. The response includes audit fields like events_with_h2h, events_skipped, and events_processed so you can verify filter behavior.
Event Details
get_event_details returns structured metadata for a single event: home_team and away_team objects with name, id, and short_name; a status object with code, description, and type; season, sport, slug, and round_info. Score fields (home_score, away_score) vary in structure by sport — football includes period-level breakdowns while other sports may return simpler totals.
The Sofascore API is a managed, monitored endpoint for sofascore.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when sofascore.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official sofascore.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Identify football matchups where one team has won over 70% of historical meetings before placing a bet
- Build a daily briefing of all basketball and tennis events with their H2H win percentages
- Filter handball or rugby fixtures to only those with 10+ historical meetings for reliable streak data
- Track manager duel records between specific coaches across European football tournaments
- Display pregame form ratings alongside H2H records in a match preview widget
- Aggregate draw-rate streaks across a full day of ice-hockey fixtures to identify low-scoring matchups
- Look up current scores and round info for multiple events using event IDs from a daily schedule pull
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.