Import Google Drive API Data to Google Sheets [2024] | API Connector (2024)

In this guide, we’ll walk through how to get data from the Google Drive API directly from Google Sheets with just an API key, using the API Connector add-on for Sheets.

This API is pretty useful because it lets you turn your Google Drive contents into an API. You can use Google Drive as a space to host JSON or other content, and then pull it into your spreadsheet, or get metadata about the files on your drive.

Please note that this demo will show only how to get data from publicly shared Google Drive files (getting private files requires OAuth; if there's interest I'll add information on that).

Contents

  • Before You Begin
  • Part 1: Set up your Google Cloud Project
  • Part 2: Get your Google Drive API Key
  • Part 3: Get your File ID
  • Part 4: Pull Google Drive Data into Sheets
  • Part 5: API Documentation

Before You Begin

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

Part 1: Set Up Your Google Cloud Project

  1. While logged into your Google account, navigate to https://console.developers.google.com/ and click Select a project.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (1)
  2. A modal will appear, prompting you to choose an existing project or create a new one. You can do either, but here we'll create a new one.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (2)
  3. You'll now see a screen asking you to name your project. Click Create.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (3)

Part 2: Get Your Google Drive API Key

  1. From the dashboard, click Enable APIs and Services.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (4)
  2. Use the search box or scroll down the page to find 'Google Drive API'. Click to select it.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (5)
  3. On the details page, click Enable.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (6)
  4. Back in the dashboard, choose Credentials from the menu.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (7)
  5. Click +Create Credentials > API Key
    Import Google Drive API Data to Google Sheets [2024] | API Connector (8)
  6. You'll now be presented with your API key. You can also restrict your key via this page, to prevent unauthorized use.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (9)

Part 3: Get your File ID

For this demo I first uploaded a small, public JSON file to Google Drive:
Import Google Drive API Data to Google Sheets [2024] | API Connector (10)

To get this file's ID, open Google Drive, right-click the file name, and click Get Link. The File ID will be the long string within the URL, shown in bold text here: https://drive.google.com/file/d/1s8tcak22l06tpDg-5yew_1S09_oD3UjG/view?usp=sharing

Part 4: Pull Google Drive API Data into Sheets

We'll now fetch that JSON file into Sheets. Substitute own file ID and API key into the request URL.

  1. Open up Google Sheets and clickExtensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • Application:Custom
    • Method:GET
    • Request URL:https://www.googleapis.com/drive/v3/files/your_file_id?alt=media&key=your_api_key
  3. Create a new tab and clickSet currentto use that tab as your data destination.
  4. Name your request and click Run. A moment later you’ll see your file in Google Sheets.
    Import Google Drive API Data to Google Sheets [2024] | API Connector (11)

Part 5: API Documentation

Official API documentation: https://developers.google.com/drive/api/v3/reference

Import Google Drive API Data to Google Sheets [2024] | API Connector (2024)

FAQs

How do I import data from API into Google Sheets? ›

Writing the Script to Import Data
  1. We define the API URL in the url variable.
  2. Using UrlFetchApp. ...
  3. We parse the JSON response into a JavaScript object using JSON. ...
  4. We get the active sheet using SpreadsheetApp. ...
  5. Finally, we write the data to the sheet using sheet.

What is the best API connector for Google Sheets? ›

Data Connector is powerful, yet easy-to-use and lets you pull data from any API into your Google Sheets™ worksheet. Just enter your API key or connect via OAuth2. Data Connector is the API connector of choice!

How to get API connector in Google Sheets? ›

After installing Apipheny, open a Google Sheet. In the menu click Extensions > Apipheny > Import API to open the API Connector. If you haven't already, sign up for a developer account on your API of choice, read the API documentation, and get your API URL, endpoint, parameters, key, and headers.

How to fetch API data in Google Sheets? ›

Enable the Google Sheets API:
  1. Go to the Google Cloud Console (console.cloud.google.com).
  2. Create a new project, or select an existing one.
  3. In the library section, enable the Google Sheets API for your project.
  4. Create credentials for your project. ...
  5. Save the API key that's generated.

How do I get data from API to spreadsheet? ›

How to extract the API data
  1. Step 1: retrieve the API data URL.
  2. Step 2: create a new, blank Excel document.
  3. Step 3: paste the API data URL in the Excel document.
  4. Step 4: Enter the credentials.
  5. Step 5: load the API data in the Excel.
Oct 28, 2021

How do I export API data to Google Sheets? ›

Export from any REST API to Google Sheets
  1. Open the Method drop-down and select the operation you want to perform. ...
  2. (Optional) Enter one or more parameters. ...
  3. (Optional) In the Output options, configure how your data will be inserted into your spreadsheet.
  4. Schedule a refresh for your export.

What is the difference between API and connector? ›

APIs are generally easier to maintain because they follow standard rules. Connectors require more specialized care and need to be updated to work with specific systems.

How much does it cost to use Google Sheets API? ›

Google Sheets' API is free to use, but usage limits apply to each user. If your app experiences heavy traffic from many users, you'll see an error message (429: Too many requests). In other words, if you exceed the number of requests, your account won't be charged for the overage.

How much is API connector Google Sheets? ›

Unlock the power of data with Apipheny, a free API connector that makes it easy to import data from or push data to any REST JSON or CSV API directly from your Google Sheets™. If playback doesn't begin shortly, try restarting your device. Your browser can't play this video.

Do you have to pay for Google Sheets API? ›

All use of the Google Sheets API is available at no additional cost.

Can we call API from Google Sheets? ›

Call REST API from Google Sheets. Sync REST API data sources and automate data refreshes within Google Sheets, streamline workflows, and most importantly - save time. Apipheny is a powerful no-code REST API connector that makes it easy to make API calls from Google Sheets.

How do I enable API in Google Sheets? ›

To enable an API for your project:
  1. Go to the API Console.
  2. From the projects list, select a project or create a new one.
  3. If the APIs & services page isn't already open, open the console left side menu and select APIs & services, and then select Library.
  4. Click the API you want to enable. ...
  5. Click ENABLE.

Can you query API in Google Sheets? ›

Google Sheets Query uses the Google API Query Language to retrieve and manipulate data from the Google Sheets API. For example, you want to retrieve all rows from a sheet where the value in column A is greater than 10.

How do I import JSON into Google Sheets? ›

Using Third-Party Add-ons

Third-party add-ons like ImportJSON offer a no-code solution to import JSON data into Google Sheets. Install the ImportJSON add-on from the Google Workspace Marketplace. After installation, use the =IMPORTJSON("URL") function directly in your Google Sheet, where "URL" is your JSON source.

How do I auto pull data in Google Sheets? ›

Smart Fill will detect patterns and make suggestions to help automate data entry. You can use Smart Fill for tasks such as extracting the first name from a given list of full names or finding values in a range or table.

How do I import JSON data into Google Sheets? ›

Using Third-Party Add-ons

Third-party add-ons like ImportJSON offer a no-code solution to import JSON data into Google Sheets. Install the ImportJSON add-on from the Google Workspace Marketplace. After installation, use the =IMPORTJSON("URL") function directly in your Google Sheet, where "URL" is your JSON source.

How do I import data from the Web into Google Sheets? ›

Here's how you can use the IMPORTDATA function: Open a Google Sheets document or create a new one. Select the cell where you want the imported data to appear. In that cell, enter the following formula: =IMPORTDATA(url), replacing "url" with the actual URL of the data source you want to import.

How do I automatically import data into Google Sheets? ›

Import Live Data to Google Sheets: Top Methods and Tools
  1. Step 1 – Install Coefficient.
  2. Step 2 – Import Live Data.
  3. Filter, sort, and limit rows to import only the data that you want into Google Sheets.
  4. Step 3 – Schedule Automatic Data Refreshes.
Jun 16, 2023

Can you do API calls in Google Sheets? ›

Call REST API from Google Sheets. Sync REST API data sources and automate data refreshes within Google Sheets, streamline workflows, and most importantly - save time. Apipheny is a powerful no-code REST API connector that makes it easy to make API calls from Google Sheets.

Top Articles
Samsung Galaxy S22 Ultra could be out of stock for months
Is Travel Insurance Mandatory for International Travel?
Victor Spizzirri Linkedin
Canya 7 Drawer Dresser
Is Sam's Club Plus worth it? What to know about the premium warehouse membership before you sign up
How to know if a financial advisor is good?
35105N Sap 5 50 W Nit
Craigslist Nj North Cars By Owner
Ou Class Nav
New Day Usa Blonde Spokeswoman 2022
Select Truck Greensboro
Regular Clear vs Low Iron Glass for Shower Doors
New Mexico Craigslist Cars And Trucks - By Owner
TS-Optics ToupTek Color Astro Camera 2600CP Sony IMX571 Sensor D=28.3 mm-TS2600CP
Craigslist Farm And Garden Tallahassee Florida
Love In The Air Ep 9 Eng Sub Dailymotion
The Cure Average Setlist
Highland Park, Los Angeles, Neighborhood Guide
60 X 60 Christmas Tablecloths
Transfer and Pay with Wells Fargo Online®
Our History
Hermitcraft Texture Pack
Uncovering The Mystery Behind Crazyjamjam Fanfix Leaked
Greenville Sc Greyhound
Stihl Dealer Albuquerque
Water Temperature Robert Moses
Maine Racer Swap And Sell
Fuse Box Diagram Honda Accord (2013-2017)
Obituaries, 2001 | El Paso County, TXGenWeb
Perry Inhofe Mansion
James Ingram | Biography, Songs, Hits, & Cause of Death
Warren County Skyward
Bozjan Platinum Coins
Audi Q3 | 2023 - 2024 | De Waal Autogroep
Prima Healthcare Columbiana Ohio
Craigs List Jonesboro Ar
Die Filmstarts-Kritik zu The Boogeyman
The Vélodrome d'Hiver (Vél d'Hiv) Roundup
What Is Kik and Why Do Teenagers Love It?
Scarlet Maiden F95Zone
Subdomain Finder
Woody Folsom Overflow Inventory
Craigslist/Nashville
Florida Lottery Powerball Double Play
A rough Sunday for some of the NFL's best teams in 2023 led to the three biggest upsets: Analysis
Wera13X
Electric Toothbrush Feature Crossword
Noelleleyva Leaks
211475039
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 5815

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.