Discover/Sofascore API
live

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.

Endpoint health
verified 2h ago
get_event_h2h
get_h2h_streaks_ranked
get_event_details
get_event_fun_facts
get_daily_events
1/5 passing latest checkself-healing
Endpoints
5
Updated
26d ago

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.

Try it
Date in YYYY-MM-DD format. Omitting uses today's date.
Comma-separated sports: football,basketball,tennis,ice-hockey,baseball,handball,rugby,american-football,volleyball,cricket,esports. Omitting queries all sports.
Maximum events to process (0 = all).
Minimum number of historical meetings required for a matchup to be included.
Maximum streak percentage threshold.
Minimum streak percentage threshold.
api.parse.bot/scraper/ca85c1b5-deac-4378-826d-742eddac6785/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
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'
Python SDK · recommended

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)
All endpoints · 5 totalmissing one? ·

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.

Input
ParamTypeDescription
datestringDate in YYYY-MM-DD format. Omitting uses today's date.
sportsstringComma-separated sports: football,basketball,tennis,ice-hockey,baseball,handball,rugby,american-football,volleyball,cricket,esports. Omitting queries all sports.
max_eventsintegerMaximum events to process (0 = all).
min_meetingsintegerMinimum number of historical meetings required for a matchup to be included.
max_percentagenumberMaximum streak percentage threshold.
min_percentagenumberMinimum streak percentage threshold.
Response
{
  "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.

Reliability & maintenanceVerified

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.

Last verified
2h ago
Latest check
1/5 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • 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
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does Sofascore have an official developer API?+
Sofascore does not publish an official public developer API. There is no documented API portal, API key signup, or published endpoint reference available from Sofascore for third-party developers.
What does get_h2h_streaks_ranked actually return, and how do the percentage filters work?+
The endpoint computes six metrics for every qualifying matchup on the queried date: home win %, away win %, draw %, home unbeaten %, away unbeaten %, and manager duel %. Only streaks where the computed percentage falls between min_percentage and max_percentage are included in the response. Setting min_meetings (e.g. 5) excludes matchups with too few historical games to be statistically meaningful. The events_skipped field tells you how many events were dropped for insufficient H2H data.
Are fun facts available for all sports?+
No. get_event_fun_facts is primarily populated for football events. For basketball, tennis, ice-hockey, and other supported sports, the endpoint typically returns no results. The API covers football fun facts and H2H text insights. You can fork it on Parse and revise to add sport-specific narrative data if Sofascore exposes it for additional sports.
Does the API return live in-play data or only pre-match and scheduled information?+
The event status and score fields in get_event_details and get_daily_events reflect the current state of an event, including in-progress scores. However, there are no streaming or push endpoints — data is returned per request. Live polling at intervals is the pattern to follow for near-real-time tracking. The API does not currently expose play-by-play timelines or live incident feeds. You can fork it on Parse and revise to add those endpoints.
Can I retrieve historical fixtures or H2H records for a specific team outside of today's scheduled events?+
Not currently. The API is anchored to daily scheduled events — you query by date and get the events scheduled for that day, then retrieve H2H stats for those matchups. There is no standalone endpoint for querying a team's full historical record or browsing past seasons. You can fork it on Parse and revise to add a team-history or season-fixtures endpoint.
Page content last updated . Spec covers 5 endpoints from sofascore.com.
Related APIs in SportsSee all →
flashscore.com API
Search teams and competitions, pull daily fixtures and live scores, and retrieve match details including events, statistics, and league standings from FlashScore.
flashscore.com.ua API
Access football match results, fixtures, team histories, and in-match statistics from Flashscore. Look up matches by date, retrieve a team's recent and upcoming games, and pull detailed events and performance metrics for any match.
livescore.com API
Track live scores and detailed statistics across football, hockey, basketball, tennis, and cricket with the ability to filter by date, sport, and league. Access match summaries, team overviews, standings, fixtures, and results to stay updated on your favorite competitions and teams.
footystats.org API
Get live football scores, team performance metrics, league standings, and head-to-head match statistics all in one place. Search teams and leagues to access detailed player stats, comprehensive analytics, and in-depth performance data across football competitions worldwide.
soccerstats.com API
Access comprehensive soccer statistics including live league tables, match details, team performance metrics, and form rankings across multiple football leagues. Search for specific teams and analyze their season statistics, head-to-head records, and competitive standings to stay informed on the latest soccer data.
whoscored.com API
Search for players and teams, then dive deep into their performance metrics, match statistics, and detailed passing data to analyze football games and player abilities. Get comprehensive insights on team performance, individual player stats, and play-by-play event information to power your football analysis and decision-making.
flashscore.com.tr API
Get live football scores, daily fixtures, and detailed match information including team lineups with player ratings, comprehensive statistics, and betting odds. Stay updated on your favorite games with real-time data and complete match summaries all in one place.
flashscore.de API
Get match listings, match details and statistics, team rosters, and a German-language sports news feed from Flashscore.de, plus lineup data with player rating fields when available.