Area
Overview
The Area Resource
is the most boring out there I’d say, but sometimes you might want to
filter things on one or more countries or show a flag.
Typically you fetch a list of areas. Some have parents (countries) and others (continents) have children.
In the end it’s a straight-forward catalogue.
curl -XGET 'https://api.football-data.org/v4/areas/2077' -H "X-Auth-Token: UR_TOKEN"
{
"id": 2077,
"name": "Europe",
"code": "EUR",
"flag": "https://crests.football-data.org/EUR.svg",
"parentAreaId": 2267,
"parentArea": "World",
"childAreas": [
{
"id": 2002,
"name": "Albania",
"countryCode": "ALB",
"flag": null,
"parentAreaId": 2077,
"parentArea": "Europe"
},
{
"id": 2006,
"name": "Andorra",
"countryCode": "AND",
"flag": null,
"parentAreaId": 2077,
"parentArea": "Europe"
},
{
"id": 2012,
"name": "Armenia",
"countryCode": "ARM",
"flag": "https://crests.football-data.org/1970.svg",
"parentAreaId": 2077,
"parentArea": "Europe"
},
{
"id": 2016,
"name": "Austria",
"countryCode": "AUT",
"flag": "https://crests.football-data.org/816.svg",
"parentAreaId": 2077,
"parentArea": "Europe"
},
[... way more areas ...]
{
"id": 2264,
"name": "Wales",
"countryCode": "WAL",
"flag": "https://crests.football-data.org/833.svg",
"parentAreaId": 2077,
"parentArea": "Europe"
}
]
}