Clubs in a competition
A
GET
/v1/leagues/{id}/teams
The clubs in a league, by season
The clubs that appear in a competition, optionally narrowed to one season.
Plan
This endpoint needs Archive.
Calling it on a lower plan returns a 403 naming the plan it needs and
a link to pricing, never a bare refusal.
Parameters
league_id
string
path
required
The competition id. e.g.
lg_24T9Z0G
season
integer
query
Season by its starting year. A 2024/25 season is
2024. e.g. 2024
Returns
data[].team_id
string
Our id for the club.
data[].team_name
string
The club's name.
data[].venue_name
string
The ground the match was played at.
data[].city_name
string
The town or city of the ground.
data[].latitude
number
The ground's latitude.
data[].longitude
number
The ground's longitude.
data[].match_count
integer
Match count.
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/lg_24T9Z0G/teams?season=2024" \ -H "X-API-Key: $FSAPI_KEY"
const res = await fetch("https://api.footballsoccerapi.com/v1/leagues/lg_24T9Z0G/teams?season=2024", { 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/lg_24T9Z0G/teams?season=2024", headers={"X-API-Key": os.environ["FSAPI_KEY"]}, ) data = r.json()["data"]
$ch = curl_init("https://api.footballsoccerapi.com/v1/leagues/lg_24T9Z0G/teams?season=2024"); 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": [
{
"team_id": "tm_330DSKV",
"team_name": "Preston",
"venue_name": "Deepdale",
"city_name": "Preston",
"latitude": 53.759444444444,
"longitude": -2.6980555555556,
"match_count": 1810
},
{
"team_id": "tm_01EYX3Q",
"team_name": "Notts County",
"venue_name": "Meadow Lane",
"city_name": "Nottingham",
"latitude": 52.9425,
"longitude": -1.137222,
"match_count": 1809
},
{
"team_id": "tm_0J5SWZQ",
"team_name": "Derby",
"venue_name": "Pride Park",
"city_name": "Derby",
"latitude": 52.914138888889,
"longitude": -1.4584388888889,
"match_count": 1752
}
],
"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.