Sportsdata is the world’s leading supplier for sports-related live data. We can use the Sportsdata API to import data from Sportsdata into Google Sheets. In this tutorial, we’ll show you how to connect the Sportsdata REST API to Google Sheets in 5 steps:
Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.
1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install
2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.
In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.
Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new
After logging into your Sportsdata account, go to https://sportsdata.io/developers/getting-started and choose the sport that you’d like to obtain the API key for:
In this example we chose NFL.
In the next popup, complete the first name, the last name, the company, the email address and check the terms and conditions checkbox, then click the Submit button:
You will receive a confirmation message:
Check your email address for a Subscription Confirmation message. Click the LAUNCH DEVELOPER PORTAL button:
In your Developer Portal you will find your generated API key:
Copy and paste your API key in a safe location because you’ll need it later.
In this section, I’ll show you how to browse the Sportsdata API documentation to find an API endpoint that retrieves the specific information you need from your Sportsdata account. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 4.
First, open the Sportsdata API documentation page: https://sportsdata.io/developers/api-documentation
The default documentation that appears when you access the link is for NFL, but you can choose the sport you want.
The menu on the left contains general topics about the Sportsdata API and the API Documentation section with the sports as categories:
If you click on a category (e.g NBA), a list with specific endpoints will be expanded in the main section of the page, along with a short description of that category:
An example endpoint is Are Games In Progress, which returns true if there are games in progress, or false otherwise. The URL for this endpoint is:
https://api.sportsdata.io/v3/nba/scores/json/AreAnyGamesInProgress
The endpoint’s documentation contains a short description of its purpose, its request URI, the API key you previously obtained if you chose this sport and a list of request parameters:
All API calls to Sportsdata should be made with the https://api.sportsdata.io/v3/ base domain.
Okay, we’re in the home stretch. Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the Import tab. With the Import Tab open, enter these details into the add-on:
Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) as required by your Sportsdata API endpoint. For this example, we are using the GET method.
API URL: In Step 3, we explained how you can find the Sportsdata API endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path, followed by any GET parameters required for your query.
For this example, we are using the News by Team endpoint, which returns player news and notes. The corresponding URL for this endpoint is:
https://api.sportsdata.io/v3/nfl/scores/json/NewsByTeam/TEAM
If you use this URL, don’t forget to replace TEAM with a correct team abbreviation.
In the Headers of the Apipheny add-on section, add one row with the following key and value:
Header Key: Ocp-Apim-Subscription-Key Value: API_KEY
You have to replace the API_KEY value with the value you previously obtained in Step 2.
Here’s what our request looks like:
The last step is to click the Run button at the bottom of the Apipheny add-on and then your Sportsdata data will be imported into your Google Sheet:
After making a successful request to the Sportsdata API, try querying a different Sportsdata API endpoint, or try using one of the more advanced features in the Apipheny add-on.
Crypto API tutorials and more:
Sponsored by Zink Virtual Tip Jar & Rewording.io Paraphrasing Tool
Accept donations on Twitch | Accept donations on Discord | Accept donations on YouTube | Accept donations on Telegram | Accept donations on Twitter | Accept donations on TikTok | Accept donations on Instagram | Accept donations on LinkedIn | Accept donations on Facebook | Accept donations on your Website