Competitions
F
GET
/v1/leagues
Every league, filterable by country
Every competition, with the country it belongs to, how many matches it holds and how many of those carry an exchange price. The league_id is the source division id and never changes.
Plan
This endpoint needs Free key. It works on the free key, which reads yesterday, as one whole day.
Parameters
country
string
query
Restrict to one country, by name as returned from
/v1/countries. e.g. England
limit
integer
query
Rows per page, 1–1000. Defaults to 100. e.g.
100
page
integer
query
Page number, 1-based. The response carries
total, total_pages, next_page and prev_page, so a UI pager has everything it needs from one call. If you send both page and cursor, page wins. e.g. 2
cursor
string
query
Opaque cursor from
meta.next_cursor. Pages by sort position rather than offset, so page 10,000 is as fast as page 1 and a new match arriving cannot shift the boundary. Pass it back unchanged; do not build or parse one yourself.Returns
data[].league_id
string
Our id for the competition.
data[].country_name
string
The country the competition belongs to.
data[].league_name
string
The competition's name.
data[].match_count
integer
Match count.
data[].priced_count
integer
Priced count.
data[].season_first
integer
Season first.
data[].season_last
integer
Season last.
meta.data_as_of
string
When the data behind this answer was last brought up to date.
meta.request_id
string
This request's id, to quote to support.
meta.count
integer
How many items are in this answer.
Request
curl "https://api.footballsoccerapi.com/v1/leagues?country=England&limit=100&page=2" \ -H "X-API-Key: $FSAPI_KEY"
const res = await fetch("https://api.footballsoccerapi.com/v1/leagues?country=England&limit=100&page=2", { headers: { "X-API-Key": process.env.FSAPI_KEY } }); const { data, meta } = await res.json();
import os, requests r = requests.get( "https://api.footballsoccerapi.com/v1/leagues?country=England&limit=100&page=2", headers={"X-API-Key": os.environ["FSAPI_KEY"]}, ) data = r.json()["data"]
$ch = curl_init("https://api.footballsoccerapi.com/v1/leagues?country=England&limit=100&page=2"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ["X-API-Key: {$key}"], ]); $data = json_decode(curl_exec($ch), true)["data"];
Example response
A real row from the archive, fetched when this page rendered. Run it against your own key below.
200 OK
application/json
{
"data": [
{
"league_id": "lg_2DGPHND",
"country_name": "World",
"league_name": "Friendlies Clubs",
"match_count": 45509,
"priced_count": 13262,
"season_first": 2020,
"season_last": 2026
},
{
"league_id": "lg_06VYC58",
"country_name": "England",
"league_name": "Championship",
"match_count": 18973,
"priced_count": 14547,
"season_first": 1892,
"season_last": 2026
},
{
"league_id": "lg_1869AE0",
"country_name": "England",
"league_name": "League One",
"match_count": 18559,
"priced_count": 14404,
"season_first": 1993,
"season_last": 2026
}
],
"meta": {
"data_as_of": "2026-10-29T04:32:57Z",
"request_id": "01J9QW3C7M4KX2VB",
"count": 3
}
}
Run it live
Paste your key and fire the real request. The key is kept in this browser only and never sent anywhere but the API.