StatsHub APIstatshub.com ↗
Retrieve xG, xGA, possession, and player-level stats from StatsHub across fixtures, matches, and league standings via 3 endpoints.
What is the StatsHub API?
The StatsHub API gives developers access to football statistics across 3 endpoints, covering match-level xG and xGA, player-level shot data, and season-level league standings with possession metrics. Starting with get_fixtures_by_date, you retrieve event IDs for any date, then drill into individual matches with get_match_stats or pull full-season team performance with get_league_standings.
curl -X GET 'https://api.parse.bot/scraper/e1f0e079-0946-4b6c-9e3c-9227eddaa64a/get_fixtures_by_date?date=2026-07-10' \ -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 statshub-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.
"""StatsHub Football Statistics — xG analysis workflow."""
from parse_apis.statshub_football_statistics_api import StatsHub, TournamentId, MatchNotFound
client = StatsHub()
# List today's fixtures; limit caps total items returned.
for fixture in client.fixtures.list(date="2025-05-25", limit=5):
print(fixture.home_team.name, "vs", fixture.away_team.name, "—", fixture.status)
# Drill into one fixture's xG stats via .first()
match = client.fixtures.list(date="2025-05-25", limit=1).first()
if match:
try:
stats = match.stats()
print(f"xG: {stats.home_xg} - {stats.away_xg}")
for player in stats.home_players[:3]:
print(f" {player.name}: xG={player.expected_goals}, shots={player.shots}")
except MatchNotFound as exc:
print(f"No stats for event {exc.event_id}")
# League standings with enum for tournament selection
for team in client.standings.list(tournament_id=TournamentId.PREMIER_LEAGUE, limit=5):
print(f"{team.position}. {team.team_name} — Pts: {team.points}, xG: {team.xg_for}, xGA: {team.xg_against}")
print("exercised: fixtures.list / fixture.stats / standings.list")
Get all football fixtures/matches for a specific date. Returns match IDs, teams, scores, tournament info, and status. Each fixture includes event_id, home_team.id, and away_team.id needed to query match-level xG stats via get_match_stats. Covers 120+ leagues worldwide.
| Param | Type | Description |
|---|---|---|
| date | string | Date in YYYY-MM-DD format. If omitted, defaults to today's date (UTC). |
{
"type": "object",
"fields": {
"date": "string in YYYY-MM-DD format",
"fixtures": "array of fixture objects with event_id, home_team, away_team, scores, tournament, status",
"total_fixtures": "integer count of fixtures returned"
},
"sample": {
"data": {
"date": "2025-05-25",
"fixtures": [
{
"slug": "bournemouth-vs-leicester-city-mebxgg",
"round": 38,
"status": "finished",
"country": "England",
"event_id": 12436536,
"away_team": {
"id": 31,
"name": "Leicester City",
"short_name": "Leicester"
},
"home_team": {
"id": 60,
"name": "Bournemouth",
"short_name": "Bournemouth"
},
"away_score": 0,
"has_lineup": false,
"home_score": 2,
"tournament": {
"id": 1,
"name": "Premier League",
"unique_id": 17,
"unique_name": "Premier League"
},
"internal_id": 8676,
"winner_code": 100,
"start_timestamp": 1748185200
}
],
"total_fixtures": 131
},
"status": "success"
}
}About the StatsHub API
Fixtures and Match Lookup
The get_fixtures_by_date endpoint accepts a date parameter in YYYY-MM-DD format (defaults to today in UTC when omitted) and returns an array of fixture objects. Each fixture carries an event_id, home and away team objects with their own IDs, scores, tournament metadata, and match status. The total_fixtures integer confirms how many matches are scheduled for that date. The event_id, home_team.id, and away_team.id values from this response are required inputs for the match stats endpoint.
Match-Level xG and Player Stats
get_match_stats takes an event_id plus the home and away team IDs and returns aggregated xG figures for both sides: home_xg, away_xg, home_xga, and away_xga. Note that home_xga equals away_xg and vice versa — the endpoint makes both explicit for convenience. It also returns home_players and away_players arrays, each containing player-level stat objects that feed into the team totals.
League Standings with Season Stats
get_league_standings returns a standings array where each team object includes position, points, xg_for, xg_against, possession, and additional season-level metrics. The tournament_id parameter selects the competition (for example, 1 maps to the Premier League). If season_id is omitted, the endpoint automatically resolves to the latest available season for that tournament, and the season_id value used is echoed back in the response.
The StatsHub API is a managed, monitored endpoint for statshub.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when statshub.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 statshub.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?+
- Track daily fixtures and filter by tournament to build a match calendar feed
- Compare home_xg vs away_xg for a completed match to assess shot quality beyond the scoreline
- Aggregate player-level xG from home_players and away_players to rank individual performers over a matchday
- Pull xg_for and xg_against from league standings to identify over- and under-performing teams relative to their points tally
- Monitor possession values across a full season from get_league_standings to analyze pressing and ball-retention trends
- Chain get_fixtures_by_date and get_match_stats to build an automated post-match report pipeline
| 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.