API Connector Documentation
Import API-Football Data to Google Sheets (RapidAPI)
This guide will show you how to pull major and minor league football stats into Google Sheets from the API-Football API, using the API Connector add-on for Sheets.
This guide will access API-Football via the RapidAPI marketplace, but if you prefer you can access their API directly from api-football.com.
Contents
- Before You Begin
- Part 1: Get your API Key
- Part 2: Pull Data from API-Football to Sheets
- Part 3: Create a Custom Request
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get your API Key
- If you haven't already, create an account and log in to your RapidAPI account. While logged in, navigate to the API-Football API located at https://rapidapi.com/api-sports/api/api-football
- Click Subscribe to Test
- You will now see a list of pricing plans. Click Subscribe, and enter your credit card details. If you want to test it out for free, choose the Basic plan.
- Once you're subscribed, you'll be directed back to the main API page. You can find your key in the Code Snippets section. Copy that down as we'll need it shortly.
Part 2: Pull Data from API-Football to Sheets
The easiest way to get started with the API-Football API is through API Connector’s built-in integration.
- In Sheets, open API Connector and create a new request (Extensions > API Connector > Open > Create request)
- Select API-Football from the drop-down list of applications
- Under Authorization, enter your RapidAPI API key.
- Choose an endpoint, for example
/fixtures
- Set at least one parameter, like a date or team ID.
- Choose a destination sheet, name your request, and hit Run to see the response data in your sheet.
Part 3: Create a Custom Request
Alternatively, you can run your own custom requests instead of using API Connector’s pre-built integration, using any of the data points shown in the API documentation. Here's an example request setup:
- Application:
Custom
- Method:
GET
- Request URL:
https://api-football-v1.p.rapidapi.com/v3/predictions?fixture=198772
- Headers:
x-rapidapi-host
:api-football-v1.p.rapidapi.com
x-rapidapi-key
:your_key
Click Run to see the results in your sheet.
Tip: use curl
The easiest way to set up custom requests is to copy cURL format requests from the RapidAPI Code Snippets section.
Import those cURL snippets into API Connector using the cURL importer located at Extensions > API Connector > Import / Export > Import cURL. This will automatically import the request URL and other settings into the API Connector request window.
Part 4: API Documentation
Official API documentation: https://www.api-football.com/documentation-v3
RapidAPI documentation: https://rapidapi.com/api-sports/api/api-football/
How do I import the soccer livescore from your api?
It’s not my API, it’s from API-Football! I believe you can use a request like
https://v3.football.api-sports.io/odds/live?fixture=123
You can also check in their discussion forum for more details: https://rapidapi.com/api-sports/api/api-football