Distance between clubs
F/v1/teams/{id}/distance/{opponent_id}
How far one club travels to another
How far the second club travels to the first, as the crow flies between the two grounds, in kilometres and miles. The same measure as away_travel_km on a match, so a distance looked up here and one read off a fixture agree.
Useful before a fixture exists: weighing a cup draw, planning a season, testing whether travel and rest explain anything. If we hold no coordinates for one of the grounds the distance comes back null and the note names which club, rather than leaving you to work out whose fault it is.
Plan
This endpoint needs Free key. It works on the free key, which reads yesterday, as one whole day.
Parameters
team_id
string
path
required
tm_1E5HXK9
opponent_id
string
path
required
tm_21FP1AT
Returns
data.team_id
string
data.team_name
string
data.venue_name
string
data.city_name
string
data.latitude
number
data.longitude
number
data.match_count
integer
meta.data_as_of
string
meta.request_id
string
Request
curl "https://api.footballsoccerapi.com/v1/teams/tm_1E5HXK9/distance/tm_21FP1AT" \ -H "X-API-Key: $FSAPI_KEY"
const res = await fetch("https://api.footballsoccerapi.com/v1/teams/tm_1E5HXK9/distance/tm_21FP1AT", { 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/teams/tm_1E5HXK9/distance/tm_21FP1AT", headers={"X-API-Key": os.environ["FSAPI_KEY"]}, ) data = r.json()["data"]
$ch = curl_init("https://api.footballsoccerapi.com/v1/teams/tm_1E5HXK9/distance/tm_21FP1AT"); 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.
{
"data": {
"team_id": "tm_01EYX3Q",
"team_name": "Notts County",
"venue_name": "Meadow Lane",
"city_name": "Nottingham",
"latitude": 52.9425,
"longitude": -1.137222,
"match_count": 1811
},
"meta": {
"data_as_of": "2026-11-12T06:18:54Z",
"request_id": "01J9QW3C7M4KX2VB"
}
}
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.