Overview

The good thing of clean RESTful APIs is that they are more or less language agnostic. Even though I’ll provide some ramp-up stuff for a couple of languages.

I basically try to address the two routes explained below. Please note that only the first one is available for all languages.

Native call

At the lowest level all you need to do to fetch data is as simple as a HTTP request. Within the last years most high level programming languages have some sort of client included. If your language shines on data structures and offers good tooling for access and manipulation you might not need anything else.

Higher abstraction library

While the native code samples will get you up and running quickly, using a library gives you even more traction. Given you have a docker installation running on your system, using the provided compose files, you can clone the entire infrastructure and run a website immediately on your local system.

Sample requests

See some arbitrary requests below.

Last match of ManCity

curl -XGET 'https://api.football-data.org/v4/teams/65/matches?status=FINISHED&limit=1' -H "X-Auth-Token: UR_TOKEN"

Next match for the Magpies

curl -XGET 'https://api.football-data.org/v4/teams/67/matches?status=SCHEDULED&limit=1' -H "X-Auth-Token: UR_TOKEN"

See todays' matches of your subscribed competitions

curl -XGET 'https://api.football-data.org/v4/matches' -H "X-Auth-Token: UR_TOKEN"

Get all matches of the Champions League

curl -XGET 'https://api.football-data.org/v4/competitions/CL/matches' -H "X-Auth-Token: UR_TOKEN"

See all upcoming matches for Real Madrid

curl -XGET 'https://api.football-data.org/v4/teams/86/matches?status=SCHEDULED' -H "X-Auth-Token: UR_TOKEN"

Get this seasons' matches where Gigi Buffon was in the squad

curl -XGET 'https://api.football-data.org/v4/players/2019/matches?status=FINISHED' -H "X-Auth-Token: UR_TOKEN"

Check schedules for Premier League on matchday 11

curl -XGET 'https://api.football-data.org/v4/competitions/PL/matches?matchday=11' -H "X-Auth-Token: UR_TOKEN"

Get the standings for dutch Eredivisie

curl -XGET 'https://api.football-data.org/v4/competitions/DED/standings' -H "X-Auth-Token: UR_TOKEN"

See best 10 scorers of Italy’s top league (scorers subresource defaults to limit=10)

curl -XGET 'https://api.football-data.org/v4/competitions/SA/scorers' -H "X-Auth-Token: UR_TOKEN"