Import Football Data To Google Sheets

Import football data to Google Sheets
Reading Time: 5 minutes

This article covers in detail how to import football data into Google Sheets from Sportradar using Amigo Data–a Google Sheets extension. Sportradar collects and analyses data for bookmarkers, media companies and sports federations.

Using Sportradar API, we can retrieve football data such as competition information, live timelines, daily summaries, head-to-head statistics, player profiles, season transfer information, win probabilities for every match, and even fun facts.

Here are the steps on how to import football data to Google Sheets:

  1. Install the Amigo Data add-on
  2. Create a Sportradar API Portal account
  3. Register an application and get the API key
  4. Choose a data endpoint
  5. Import the data to Google Sheets

Let’s get to the business! The game, I mean.

How to import football data to Google Sheets

1. Install the Amigo Data add-on

Install the Amigo Data Google Sheets add-on from the Google Workspace Marketplace.

Amigo Data in Google Workspace Marketspace

Click here to install.

Alternatively, you can get it from Google Sheets.

  • Open a new sheet
  • Go to Extensions→Add-ons→Get add-ons
  • Search for Amigo Data and install

2. Create a Sportradar API Portal account

Go to developer.sportradar.com and click Register.

Sportradar homepage

Fill in all the required fields and click the Register button. Confirm the account by clicking the link sent to the email address to complete the registration.

3. Register an application and get the soccer API key

Navigate to My Account and click on Applications.

Account section

Click Create a New App.

Creating a new app

Register an application by filling in all the necessary details. Select all the sport or league for which you want to get a key. Make sure that soccer is selected.

Select the sport for which to generate API key

Go to My Account to find the keys for the sports/leagues you’ve selected.

The API key for the football

4. Choose a data endpoint

Go to the API documentation page. Here’s the link.

API documentation page link

To test endpoints using the interactive API documentation, click API Sandbox.

API Sandbox

Change the sport to Soccer.

Selecting the sport for the interactive API

If you selected the soccer API while registering the app, the key should be automatically added on selecting the sport. If the sport or the league isn’t added, then you can go to My Apps and add more APIs.

Adding more APIs from the app settings

Underneath you’ll find the list of all endpoint categories. Select any one. Eg. Season Schedule.

Selecting the API endpoints

Fill in the parameters. In the season_id field, enter the season ID for which you want to retrieve the schedule. Eg. sr:season:93741 for English Premier League 2022-23 season.

Filling in the parameters

Each competition–eg. LaLiga, Champions League, FIFA World Cup, etc–has its own ID. They can be found by using the Competitions endpoint. And the season ID with the Competitions Seasons by using the competition ID obtained with the Competitions endpoint.

Change the format to .json. Then click the Try it! button.

A few moments later, we’ll see the request status along with the request URL and the response body.

The REQUEST URI is the endpoint URL we’ll use to import the data to Google Sheets.

The endpoint URL

Here’s the endpoint URL.

Replace API_KEY in the URL with your API key.

5. Import the data to Google Sheets

Open Google Sheets and launch Amigo Data from the Extensions tab.

Launch the Amigo Data extension

Select Custom API from the list of sources.

List of sources to connect to with Amigo Data

Paste the request URI obtained in the previous step in the API URL field.

Pasting the endpoint

Click the PREVIEW button. The preview of the data will appear in a short while depending on the size of the dataset.

Flatten and expand the nested data points. Then click IMPORT.

Expanding and flattening the datasets

The requested data will be imported to Google Sheets in a while. Shown below is a screenshot of the imported data.

Snippet of the imported data

The imported data can be automatically updated at regular intervals–eg. weekly. To learn how to set a refresh schedule and set up alerts to get the report sent to your inbox, click here.

Some other endpoints

Head-to-head statistics

Use the Competitor vs Competitor endpoint to get the head-to-head stats for two different clubs. The endpoint URL below will return the head-to-head statistics for Manchester United and Liverpool. sr:comptitor:35 is the ID for Man United and 44 for Liverpool.

Seasonal Competitor Statistics

The Seasonal Competitor Statistics endpoint retrieves the players and club statistics for a particular club in a given season.

Manchester City stats for the season 2022-23 can be retrieved by using the following endpoint URL.

Transfers list

List of all the transfers in a season for a league can be got using the Seasons Transfers endpoint.

The endpoint below will fetch the results of all the transfers in the Premier League for the season 2022-23.

You can use Amigo Data to import various other types of data into Google Sheets such as stock data, latest releases and track information from Spotify, Wikipedia page metrics, and crypto prices. Visit our blog to discover more.

Some similar articles you may be interested in.

Import Reddit Data to Google Sheets

Import Data From Spotify to Google Sheets

Import IMDb Data to Google Sheets