sofascore.com APIwww.sofascore.com ↗
Access Sofascore head-to-head stats, daily sports events, and streak metrics across football, basketball, tennis, and 6 more sports via 5 structured endpoints.
curl -X GET 'https://api.parse.bot/scraper/ca85c1b5-deac-4378-826d-742eddac6785/get_h2h_streaks_ranked?date=2025-06-15&sports=football&max_events=10&min_meetings=3&max_percentage=100&min_percentage=80' \ -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.
| 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-04-24",
"streaks": [
{
"count": 7,
"sport": "football",
"metric": "Villarreal unbeaten (away)",
"matchup": "Real Oviedo vs Villarreal",
"category": "Spain",
"event_id": 14083282,
"away_team": "Villarreal",
"home_team": "Real Oviedo",
"percentage": 100,
"tournament": "LaLiga",
"total_meetings": 7
}
],
"min_meetings": 3,
"events_skipped": 0,
"max_percentage": 100,
"min_percentage": 80,
"sports_queried": [
"football"
],
"events_with_h2h": 10,
"events_processed": 10,
"total_events_found": 10,
"total_streaks_found": 8
},
"status": "success"
}
}About the sofascore.com API
This API exposes 5 endpoints for extracting head-to-head statistics, streak rankings, and event schedules from Sofascore across up to 9 sports. The get_h2h_streaks_ranked endpoint computes and ranks H2H metrics — home win rate, away win rate, draw rate, unbeaten rates, and manager duel records — filtered by configurable percentage thresholds and a minimum meetings requirement, returning only statistically meaningful matchup patterns for any given date.
Daily Events and Event Details
The get_daily_events endpoint returns all scheduled events for a given date across any combination of football, basketball, tennis, ice-hockey, baseball, handball, rugby, american-football, and volleyball. Each event object includes event_id, sport, tournament, tournament_category, home_team, away_team, status_type, and start_timestamp. The limit and sports parameters let you narrow results to specific sports or cap total volume. The event_id values returned here are the keys used by all other endpoints.
The get_event_details endpoint accepts an event_id and returns structured metadata: home_team and away_team objects (each with name, id, short_name), score objects (home_score, away_score — structure varies by sport), status with code and description, season, round_info, and a URL slug. Score structure is sport-dependent, so callers should expect variation between a football match and a tennis match.
Head-to-Head Data
The get_event_h2h endpoint returns a team_duel summary with home_wins, away_wins, draws, and total_meetings, alongside manager_duel win/draw/loss counts, pregame_form arrays with recent form and ratings for both sides, and a fun_facts array of text strings. Manager duel and pregame form fields return empty objects when the data is unavailable for a given matchup.
The get_h2h_streaks_ranked endpoint aggregates H2H data across all events for a date and ranks matchups by computed streak metrics. The min_percentage and max_percentage parameters define the window of interest (e.g., 70–100 for high-confidence streaks), min_meetings filters out low-sample matchups, and max_events caps processing load. Each streak object in the response includes metric, count, total_meetings, sport, tournament, category, home_team, away_team, and matchup. Response metadata fields — events_processed, events_with_h2h, events_skipped, total_events_found — give visibility into how much of the day's slate had usable H2H history.
- Build a daily H2H streak digest that surfaces matchups where one side has won 80%+ of historical meetings, using
get_h2h_streaks_rankedwithmin_percentage=80. - Populate a pre-match stats widget with head-to-head records, manager duel history, and pregame form via
get_event_h2h. - Monitor all daily football and basketball fixtures with team names, tournament context, and start times using
get_daily_events. - Generate automated pre-match editorial notes for football games using fun facts from
get_event_fun_facts. - Track live and final scores across multiple sports for a specific event day using
get_event_detailswith sport-specific score structures. - Filter H2H streaks to a specific percentage band (e.g., 60–75%) to identify competitive but historically skewed matchups for analysis.
- Cross-reference manager duel win rates from
get_event_h2hagainst team-level H2H records to separate team vs. tactical patterns.
| 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 | 250 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.
Does Sofascore have an official developer API?+
What does `get_h2h_streaks_ranked` actually return, and how does the percentage filtering work?+
min_percentage and max_percentage. Results are ranked in descending order. The min_meetings parameter removes matchups with too few historical encounters to be meaningful. Response metadata includes events_processed, events_skipped, and events_with_h2h so you can see how much of the day's slate qualified.Are fun facts available for all sports?+
get_event_fun_facts is primarily available for football events. For non-football events it typically returns a 'not found' response. get_event_h2h also includes a fun_facts field, but it returns an empty array when the data is not available for a given matchup.Does the API return player-level statistics or lineups?+
How does the score structure differ across sports in `get_event_details`?+
home_score and away_score fields vary by sport — a football event may return period scores and extra time, while a tennis event structures scores by set. The endpoint does not normalize these into a single schema, so callers should handle the response shape conditionally based on the sport field.