Print

Import Yahoo Fantasy Sports Data to Google Sheets

In this guide, we’ll walk through how to import Yahoo Fantasy Sports data directly into Google Sheets, using the API Connector add-on for Sheets. We'll set up a custom OAuth connection and connect to their API.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get your Yahoo Fantasy Sports Credentials

  1. Log in to Yahoo and navigate to https://developer.yahoo.com/apps/create/
  2. You'll be prompted to give your application a name and description. Make sure to use the redirect URL provided in this article on configuring custom OAuth. Select OAuth Client type of confidential client, choose API Permissions of Fantasy Sports, and click Create App.
    yahoofantasysports-createapp
  3. You'll now be presented with your client ID and secret. Copy these, we'll need them shortly.
    yahoofantasysports-credentials

Part 2: Connect Yahoo Fantasy Sports to API Connector

  1. Open up Google Sheets and click Extensions > API Connector > Manage Connections
  2. Scroll to the bottom of the sidebar and click Add Custom OAuth
  3. Fill in the Custom OAuth modal as follows:
    • OAuth Grant Type: Authorization Code
    • Name: Custom Yahoo Sports
    • Authorization Base URL: https://api.login.yahoo.com/oauth2/request_auth
    • Token URL: https://api.login.yahoo.com/oauth2/get_token
    • Client IDprovided by Yahoo
    • Client Secretprovided by Yahoo
      yahoosports-customoauth
  4. Click Save
  5. Click Manage Connections to return to the list of connections
  6. Scroll down until you find your new custom connection. Click Connect
    yahoofantasysports-connect
  7. You'll be prompted to give access to the new app you created above. Click Agree
    yahoofantasysports-agree
  8. You'll be returned to your sheet and can verify that the new connection is now active.

Part 3: Get Yahoo Fantasy Sports Data in Sheets

To create a request, include your full request URL in the request URL field, and select your custom Yahoo Sports connection from the dropdown OAuth menu.

You can see the full list of available endpoint and parameters in the API documentation. For example, to get NFL teams for the logged in user, run a request like this:

  • Application: Custom
  • Method: GET
  • Request URL: https://fantasysports.yahooapis.com/fantasy/v2/users;use_login=1/games;game_keys=nfl/teams
  • OAuth: Custom Yahoo Sports

Part 4: API Documentation

Official API documentation: https://developer.yahoo.com/fantasysports/guide/

Leave a Comment

Jump To