Do not expose your API key in public client-side code or public repos.
Credits
Each API call consumes credits from your balance. Credits never expire. New accounts get 100 free credits.
Endpoint
Cost
GET /matches
1 credit per call
GET /match/details
1 credit per call
GET /match/scores
1 credit per call
GET /standings
1 credit per call
GET /fixtures
1 credit per call
GET /team/players
1 credit per call
GET /team/matches
1 credit per call
GET /player/search
1 credit per call
GET /player/statistics
1 credit per call
GET /webhook/register
Free
GET /webhook/delete
Free
GET /webhook/list
Free
Webhook notification delivery
1 credit per call
Remaining balance is returned in every response under credits_remaining and the X-Credits-Remaining header.
Errors
All errors return JSON with a code and message:
{ "error": "Invalid API key.", "code": 401 }
Code
Meaning
401
Missing or invalid api_key
402
Insufficient credits
400
Invalid parameter (e.g. bad date format)
503
Upstream data source unavailable
GET /matches
Returns basketball matches for a given date. Optionally translate team and competition names.
GET/api/v1/matches1 credit
Parameters
Parameter
Required
Default
Description
api_key
Yes
—
Your API key
date
No
Today
Match date in YYYY-MM-DD format
lang
No
en
Response language: entrderu
Example requests
# Today's matches (English)
https://live-basketball-api.com/api/v1/matches?api_key=YOUR_KEY# Specific date
https://live-basketball-api.com/api/v1/matches?api_key=YOUR_KEY&date=2026-06-29
# Turkish translation
https://live-basketball-api.com/api/v1/matches?api_key=YOUR_KEY&lang=tr
# Russian + specific date
https://live-basketball-api.com/api/v1/matches?api_key=YOUR_KEY&date=2026-06-29&lang=ru
Returns standings (league table) for a competition. Supports multi-group competitions (e.g. cup stages).
GET/api/v1/standings1 credit
Parameters
Parameter
Required
Default
Description
api_key
Yes
—
Your API key
league_id
Yes
—
Sofascore uniqueTournament ID (numeric β from competition.id in match responses)
season_id
No
latest
Sofascore season ID (numeric β from seasons[] in response); defaults to current season
lang
No
en
Response language: entrderu
Example request
https://live-basketball-api.com/api/v1/standings?api_key=YOUR_KEY&league_id=21995&lang=en
# With specific season
https://live-basketball-api.com/api/v1/standings?api_key=YOUR_KEY&league_id=21995&season_id=88780&lang=tr
"next" (upcoming) or "last" (past) β reflects the direction param you sent
page / has_next_page
integer / bool
Current page and whether more pages exist
seasons
array
All seasons for this league β use season_id from here to switch seasons
matches[].id
integer
Numeric match ID β use in /match/details and /match/scores
matches[].round
integer|null
Round number within the season; null if league doesn't use rounds
matches[].competition.id
integer
Sofascore uniqueTournament ID
matches[].home / away
object
id (integer), name, logo URL
matches[].status
string
Translated status label (e.g. "Finished", "Not Started")
matches[].score
object
home/away totals and q1βq4, ot arrays; null values before match starts
matches[].winner
string|null
"home", "away", or null
Where to find team_id
Use the home_team.id or away_team.id values returned by /matches or /fixtures.
GET /team/players
Returns the full squad roster for a team including physical stats, contract details, injury status, and player photos. The endpoint automatically resolves the team name and fetches the roster. Covers all 30 NBA teams.
GET/api/v1/team/players1 credit
Parameters
Parameter
Required
Default
Description
api_key
Yes
—
Your API key
team_id
Yes
—
Team ID β obtained from home_team.id / away_team.id in /matches or /team/matches
Final score {home, away} β null for upcoming matches
matches[].periods
object
Per-quarter scores {Q1β¦Q4, OT} each {home, away}
matches[].winner
string|null
"home" Β· "away" Β· null
matches[].side
string
"home" or "away" β which side the requested team played on
matches[].result
string|null
Result from the team's perspective: W Win Β· L Loss Β· D Draw Β· null for upcoming
matches[].team_score / opp_score
integer|null
Score of the requested team and their opponent respectively
GET /player/search
Search basketball players by name. Sofascore's underlying search mixes every sport together β this endpoint filters the raw results down to basketball players only, de-duplicates them, and paginates the clean list for you (20 players per page).
GET/api/v1/player/search1 credit
Parameters
Parameter
Required
Default
Description
api_key
Yes
—
Your API key
q
Yes
—
Search text β player name (min 2, max 100 characters)
page
No
0
0-based page number over the filtered, basketball-only results (20 per page)
lang
No
en
Response language: entrderu
Example requests
# Search for a player
https://live-basketball-api.com/api/v1/player/search?api_key=YOUR_KEY&q=michael%20jordan
# Second page of a common-surname search
https://live-basketball-api.com/api/v1/player/search?api_key=YOUR_KEY&q=smith&page=1
# Turkish position labels
https://live-basketball-api.com/api/v1/player/search?api_key=YOUR_KEY&q=luka&lang=tr
Whether another page of basketball results is available
result_count
integer
Number of players in this page
players[].id
integer
Sofascore player ID β use with other endpoints where applicable
players[].name / short_name / slug
string
Full name, abbreviated name, and URL slug
players[].jersey_number
string|null
Current jersey number, if known
players[].position / position_name
string|null
Position abbreviation and localized full name
players[].nationality / nationality_code
string|null
Country name and ISO alpha-2 code
players[].retired / deceased
bool
Career/life status flags
players[].team
object|null
Current team id, name, slug, national-team flag, and logo URL
players[].photo
string
Player photo URL
Sofascore's search is fuzzy and covers every sport, so hit rates for basketball vary by query. This endpoint scans up to 20 raw result pages behind the scenes to fill each 20-player page β for very obscure names it may return fewer than 20 results, or none at all (still a normal 200 response with an empty players array).
GET /player/statistics
Player career statistics, broken down by competition and season. You won't usually know a player's league_id/season_id up front, so send only player_id and the endpoint automatically returns their most recent season in their primary competition β plus a full competitions catalogue listing every league_id/season_id this player has stats for, so you can call it again for any other one.
GET/api/v1/player/statistics1 credit
Parameters
Parameter
Required
Default
Description
api_key
Yes
—
Your API key
player_id
Yes
—
Sofascore player ID (numeric) β find it via /player/search
league_id
No
auto
Sofascore uniqueTournament ID, taken from a previous call's competitions[].league_id. Omit it and the player's primary competition is picked for you.
season_id
No
auto — latest
Sofascore season ID. Works with or withoutleague_id β if you only have a season_id (e.g. from competitions[].seasons[].season_id), the endpoint finds which competition it belongs to for you.
lang
No
en
Response language: entrderu
Example requests
# Just the player_id β auto-picks their primary league + latest season,# and returns the full competitions catalogue for follow-up calls
https://live-basketball-api.com/api/v1/player/statistics?api_key=YOUR_KEY&player_id=861608
# A specific competition (league_id from the "competitions" list above)
https://live-basketball-api.com/api/v1/player/statistics?api_key=YOUR_KEY&player_id=861608&league_id=132
# A specific competition + season
https://live-basketball-api.com/api/v1/player/statistics?api_key=YOUR_KEY&player_id=861608&league_id=132&season_id=65360
# Only a season_id, no league_id β endpoint resolves the competition itself
https://live-basketball-api.com/api/v1/player/statistics?api_key=YOUR_KEY&player_id=861608&season_id=65360
Games with double/triple-digit stats in two/three categories
rating
float|null
Sofascore's average game rating for this split
team
object|null
Team played for during this split
ranking
object|null
League-wide rank (total & per-game) for points/rebounds/assists/steals/blocks/turnovers/plus-minus/minutes/shooting %, out of all players with recorded stats that season
competitions
array
Every league/season this player has recorded stats for β always included, use it to pick a different league_id/season_id for your next call
competitions[].seasons[].types
array
Which stat blocks exist for that season: regular_season, playoffs, overall
You don't need to know a player's league_id or season_id in advance β send just player_id, read the stats for their current competition directly off the response, and use the competitions array whenever you want a different league or a past season (e.g. their Euroleague years, or an NBA season before a trade).
Webhooks
Register HTTP endpoints to receive real-time push notifications when basketball events occur. Registering, deleting, and listing webhooks is free. Each notification delivered to your URL costs 1 credit.
How it works: When a monitored match event fires, our system sends a POST request to your registered URL with a JSON payload. If you provided a secret, the request includes an X-Webhook-Signature: sha256=HMAC header for verification.
Available Event Types
Event
Triggers whenβ¦
Cost
Match lifecycle
match.start
Match kicks off (status β in-progress)
1 credit
match.finish
Final whistle β full-time result available
1 credit
match.postponed
Match officially postponed
1 credit
match.cancelled
Match cancelled
1 credit
Periods
period.start
New quarter/period starts (Q1, Q2, Q3, Q4, OT)
1 credit
period.end
Quarter/period ends (includes half-time)
1 credit
Scoring
score.update
Score changed (any basket)
1 credit
basket.2pt
2-point field goal made
1 credit
basket.3pt
3-point field goal made
1 credit
basket.freethrow
Free throw made
1 credit
In-game events
foul
Foul committed (personal, technical, or flagrant)
1 credit
timeout
Timeout called
1 credit
substitution
Player substitution (in/out)
1 credit
GET /webhook/register
Register a URL to receive event notifications. You can specify which event types to subscribe to, or subscribe to all.
GET/api/v1/webhook/registerFree
Parameters
Parameter
docs_th_req
Description
api_key
β
Your API key
url
β
HTTP/HTTPS endpoint that will receive POST notifications (max 500 chars)
events
Comma-separated event slugs, or all (default: all). Example: match.start,score.update
secret
Optional secret (max 64 chars). Used to sign payloads via X-Webhook-Signature: sha256=HMAC
Maximum 10 webhooks per account. Registering the same URL twice returns a 409 error.
Verifying the Signature (Secret)
When you register a webhook with a secret, every delivery includes an X-Webhook-Signature: sha256=HMAC header. Verify it on your server to confirm the request came from us and was not tampered with.
Every webhook POST uses the same JSON envelope. The match block reflects the match state at the moment the event fired. Only the data field differs per event type.