A fictional league: teams with nested player squads, a standings table, and a match simulator with input validation.
The Football API keeps league tables, squads and simulated match results — data that changes only when a match is played, which makes it the right place to practise HTTP caching. Standings respond with an ETag, and a conditional GET carrying If-None-Match answers 304 with no body at all.
Base URL: https://funapi.dev/api/football/v1 · 7 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
GET https://funapi.dev/api/football/v1/teams — List teams (paginated). No token, no signup:
curl -i https://funapi.dev/api/football/v1/teams
answers 200 OK with:
{
"page": 1,
"pageSize": 4,
"total": 6,
"totalPages": 2,
"data": [
{
"id": 1,
"name": "Atlas FC",
"city": "Istanbul",
"founded": 1962,
"_v": 1
},
{
"id": 2,
"name": "River Wolves",
"city": "Porto Verde",
"founded": 1948,
"_v": 1
},
{
"id": 3,
"name": "Port Albion",
"city": "Southbay",
"founded": 1931,
"_v": 1
},
{
"id": 4,
"name": "Falcon United",
"city": "Ankara",
"founded": 1975,
"_v": 1
}
]
}
six fictional clubs
GET /football/v1/teams — List teams (paginated) · Responds with 200 400 404 Link to this endpointGET /football/v1/teams/{id} — Get one team · Responds with 200 404 Link to this endpointGET /football/v1/teams/{id}/players — Get a team's squad (nested) · Responds with 200 404 Link to this endpointGET /football/v1/teams/{id}/matches — Get a team's match history (nested resource) · Responds with 200 404 Link to this endpointDELETE /football/v1/teams/{id} — Remove a team (409 if it has played matches) (requires Bearer auth) · Responds with 204 401 403 404 409 412 Link to this endpointstandings and matches
GET /football/v1/standings — League table — cacheable (ETag / If-None-Match / 304) · Responds with 200 304 Link to this endpointPOST /football/v1/matches — Simulate a match (requires Bearer auth) · Responds with 201 400 401 Link to this endpointLast updated