Sofascore APIsofascore.com ↗
Access Sofascore head-to-head stats, daily events, lineups, odds, and incident timelines across football, tennis, basketball, and more via 12 endpoints.
What is the Sofascore API?
This API exposes 12 endpoints covering Sofascore data: daily scheduled events across 9 sports, head-to-head statistics, match lineups, in-game incident timelines, pre-match odds, and event statistics. The get_h2h_streaks_ranked endpoint computes and filters H2H streak metrics — home win rate, away unbeaten rate, draw percentage, and manager duel records — across every matchup on a given date, returning only those falling within your configured percentage thresholds.
curl -X GET 'https://api.parse.bot/scraper/ca85c1b5-deac-4378-826d-742eddac6785/get_h2h_streaks_ranked?date=2026-09-08&sports=football&max_events=3&min_meetings=3&max_percentage=100&min_percentage=50' \ -H 'X-API-Key: $PARSE_API_KEY'
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 Events and H2H Coverage
get_daily_events returns all scheduled matches for a given date across up to 9 sports (football, basketball, tennis, ice-hockey, baseball, handball, rugby, american-football, volleyball). Each event object includes event_id, home_team, away_team, tournament, tournament_category, and status. That event_id is the key input for every other event-level endpoint. The sports parameter accepts a comma-separated list; omitting it queries all supported sports. Use limit to cap the result set.
H2H Streaks and Metrics
get_h2h_streaks_ranked is the highest-level endpoint. It collects all daily events, resolves H2H history for each matchup, and computes six streak metrics per pair: home win %, away win %, draw %, home unbeaten %, away unbeaten %, and manager duel %. Results are filtered by min_percentage and max_percentage thresholds and require at least min_meetings historical encounters. The response includes events_processed, events_skipped, and events_with_h2h counts alongside the ranked streaks array. For direct team-pair lookups, get_h2h takes team_id and opponent_id and returns up to 10 most-recent finished matches with scores and winner flags.
Match Detail Endpoints
get_event_details returns structured score objects (format varies by sport), round_info, season, and a status object with code, description, and type. get_event_statistics covers finished matches and exposes possession, xG, shots on/off target, corners, fouls, passes, tackles, offsides, and free kicks for both sides. get_event_incidents returns a chronological timeline of goals (scorer, minute, running score, penalty/own-goal flags), cards (player, colour, minute), substitutions, and VAR decisions — currently for football events. get_match_lineup returns formation and 11 starters with player_id, name, shirt_number, and position for each side, plus a lineup_status field that distinguishes confirmed, predicted, and unavailable.
Tennis, Odds, and Fun Facts
get_tennis_fixtures is a sport-specific endpoint that adds ATP/WTA rankings, seeds, surface type, and venue details not present in the generic get_daily_events response. get_event_odds returns pre-match betting markets with fractional odds per choice; total_markets indicates how many markets exist for a given event. get_event_fun_facts returns editorial H2H insights with a highlighted boolean per fact; availability is effectively limited to football events.
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 matchups with historically dominant home or away records using
get_h2h_streaks_rankedpercentage filters. - Build a daily football briefing with confirmed lineups from
get_match_lineupand incident timelines fromget_event_incidents. - Compare pre-match xG and possession stats from
get_event_statisticsagainst actual results for model training. - Track ATP/WTA player seeds and surface types across tournament rounds using
get_tennis_fixtures. - Display pre-match odds across markets for football and tennis events via
get_event_odds. - Find the next scheduled fixture between two clubs using
get_upcoming_matchwith numericteam_idandopponent_id. - Enrich a sports betting dashboard with manager duel records and pregame form ratings from
get_event_h2h.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Sofascore have an official developer API?+
What does `get_h2h_streaks_ranked` return compared to `get_event_h2h`?+
get_h2h_streaks_ranked processes all daily events in bulk, computes derived percentage metrics (home win %, away unbeaten %, draw %, manager duel %), and filters results by min_percentage/max_percentage thresholds — useful for finding matchups with consistent patterns across a full slate. get_event_h2h targets a single event_id and returns raw team duel counts (home_wins, away_wins, draws, total_meetings), manager duel records, pregame form arrays, and fun facts for that specific fixture.Are player-level season statistics available?+
get_event_statistics), lineups with player identifiers (get_match_lineup), and in-match incident attribution (get_event_incidents), but does not expose individual player season aggregates like goals scored, assists, or ratings across a campaign. You can fork this API on Parse and revise it to add a player-season stats endpoint.How fresh is the event data, and does it include live match state?+
get_daily_events reflects the scheduled and in-progress event list for the requested date. get_event_details includes a status object with code and type, and score fields that reflect the current state at time of request. However, the API is not designed as a push-based live ticker; polling frequency is constrained by your plan's rate limits. Continuously updated live score streaming is not a current feature. You can fork this API on Parse and revise it to add more granular live polling logic.Do fun facts and incident timelines work for all sports?+
get_event_fun_facts is documented to be primarily available for football events; non-football event IDs typically return input_not_found. get_event_incidents (goals, cards, substitutions, VAR) is also described as available for finished football matches specifically. Basketball, tennis, and other sports incidents are not currently covered. You can fork this API on Parse and revise it to add sport-specific incident endpoints for other disciplines.