Google Sheets API Overview  |  Google for Developers (2024)

  • Home
  • Google Workspace
  • Google Sheets
  • Guides
Stay organized with collections Save and categorize content based on your preferences.

The Google Sheets API is a RESTful interface that lets you read and modify aspreadsheet's data. The most common uses of this API include the followingtasks:

  • Create spreadsheets
  • Read and write spreadsheet cell values
  • Update spreadsheet formatting
  • Manage Connected Sheets

Below is a list of common terms used in the Sheets API:

Spreadsheet

The primary object in Google Sheets that can contain multiple sheets, eachwith structured information contained in cells. ASpreadsheet resource represents every spreadsheet and has aunique spreadsheetId value,containing letters, numbers, hyphens, or underscores. You can find thespreadsheet ID in a Google Sheets URL:

https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0

Sheet

A page or tab within a spreadsheet. ASheet resource represents each sheet and hasa unique title and numericsheetId value. Youcan find the sheet ID in a Google Sheets URL:

https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId

Cell

An individual field of text or data within a sheet. Cells are arranged inrows and columns, and can be grouped as a range of cells. ACellData resource represents each cell, butit doesn't have a unique ID value. Instead, rowand column coordinates identify the cells.

A1 notation

A syntax used to define a cell or range of cells with a string thatcontains the sheet name plus the starting and ending cell coordinates usingcolumn letters and row numbers. This method is the most common and usefulwhen referencing an absolute range of cells.

Show examples

  • Sheet1!A1:B2 refers to the first two cells in the top two rows of Sheet1.
  • Sheet1!A:A refers to all the cells in the first column of Sheet1.
  • Sheet1!1:2 refers to all the cells in the first two rows of Sheet1.
  • Sheet1!A5:A refers to all the cells of the first column of Sheet 1, from row 5 onward.
  • A1:B2 refers to the first two cells in the top two rows of the first visible sheet.
  • Sheet1 refers to all the cells in Sheet1.
  • 'My Custom Sheet'!A:A refers to all the cells in the first column of a sheet named "My Custom Sheet." Single quotes are required for sheet names with spaces, special characters, or an alphanumeric combination.
  • 'My Custom Sheet' refers to all the cells in 'My Custom Sheet'.

Tip: Where possible, use distinct names for the objects within your spreadsheets. For example, A1 refers to the cell A1 in the first visible sheet, whereas 'A1' refers to all the cells in a sheet named A1. Similarly, Sheet1 refers to all the cells in Sheet1. However, if there’s a named range titled "Sheet1", then Sheet1 refers to the named range and 'Sheet1' refers to the sheet.

R1C1 notation

A syntax used to define a cell or range of cells with a string thatcontains the sheet name plus the starting and ending cell coordinates usingrow numbers and column numbers. This method is less common than A1 notation, but can beuseful when referencing a range of cells relative to a given cell'sposition.

Show examples

  • Sheet1!R1C1:R2C2 refers to the first two cells in the top two rows of Sheet1.
  • R1C1:R2C2 refers to the first two cells in the top two rows of the first visible sheet.
  • Sheet1!R[3]C[1] refers to the cell that is three rows below and one column to the right of the current cell.
Named range

A defined cell or range of cells with a custom name to simplifyreferences throughout an application. A FilterView resource represents a named range.

Protected range

A defined cell or range of cells that cannot be modified. AProtectedRange resource represents a protected range.

Next steps

  • To learn about developing with Google Workspace APIs, including handlingauthentication and authorization, refer toDevelop on Google Workspace.

  • To learn how to configure and run a simple Sheets API app, read theQuickstarts overview.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-03-05 UTC.

Google Sheets API Overview  |  Google for Developers (2024)

FAQs

How do I get Google spreadsheet answers? ›

On your computer, open a spreadsheet in Google Sheets. If you want to ask questions about data that's on a different sheet, at the top right click Edit and make your changes. Under "Answers," enter your question in the box and press Enter. To find answers, click the question under the text box.

What are the restrictions for Google Sheets API? ›

Sheets API has per-minute quotas, and they're refilled every minute. For example, there's a read request limit of 300 per minute per project. If your app sends 350 requests in one minute, the additional 50 requests exceed the quota and generates a 429: Too many requests HTTP status code response.

What can you do with Google Sheets API? ›

The Google Sheets API is a RESTful interface that lets you read and modify a spreadsheet's data. The most common uses of this API include the following tasks: Create spreadsheets. Read and write spreadsheet cell values.

How do I get the name of all the sheets in Google Sheets API? ›

To get the names of all the sheets in a Google Sheets spreadsheet, we need to first get a reference to the spreadsheet. Then we need to get all the sheets in it using the getSheets() method of the Spreadsheet object.. Finally, we get the name of each sheet using the getName() method of the Sheet object.

How do I analyze data in Google Spreadsheet? ›

Sheets: Get automatic charts
  1. In a spreadsheet, select a range of cells, columns, or rows. Otherwise, you'll get insights based on where your cursor is.
  2. At the bottom, click Explore .
  3. Choose an option: Point to a chart and click Insert chart . Ask a question about your data under Answers. The results can include charts.

What is the free limit for Google Sheets API? ›

For Google Sheets, the limit is 500 requests per 100 seconds per project, and 100 requests per 100 seconds per user. There is no daily usage limit. You can get your own free Google Sheets API key by following the steps below.

Are Google APIs free? ›

All use of Google Search Console API is free of charge. However, it is subject to usage limits. Was this helpful? Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.

Can I use Google Sheets as a API? ›

The Google Sheets API lets you create, clear, copy, and delete sheets, and also control their properties. The examples on this page illustrate how you can achieve some common Sheets operations with the Sheets API. These examples are presented in the form of HTTP requests to be language neutral.

What is the overview of Google Sheets? ›

Google Sheets is a web-based application that enables users to create, update and modify spreadsheets and share the data online in real time. Google's product offers typical spreadsheet features, such as the ability to add, delete and sort rows and columns.

What is the best API connector for Google Sheets? ›

Data Connector is the API connector of choice! Data Connector is the ONLY Add-on of it's kind that gives you OAuth2 connections, JMESPath™ and other filters on it's free tier. Other Add-ons make you pay for those features.

What are 3 things you can use Google Sheets to do? ›

Work with your data
  • Copy formatting from any text and apply it to another selection of text.
  • Format data as currency, a percentage, change decimal places, and more.
  • Add or edit cell borders.
  • Merge cells.
  • Change text alignment.
  • Change how text wraps or rotate text.

How to get data from Google Sheets API? ›

API Integration: How to Import Data From API to Google Sheets
  1. Step 1: Open a New Sheet.
  2. Step 2: Go to the Apps Script Editor.
  3. Step 3: Name Your Project.
  4. Step 4: Add API Example Code.
  5. Step 5: Run Your Function.
  6. Step 6: Authorize Your Script To Import Data From API to Google Sheets.
Jul 26, 2023

How to get Google Sheets API key? ›

Setting up API keys
  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 left side menu and select APIs & services.
  4. On the left, choose Credentials.
  5. Click Create credentials and then select API key.

How do you count how many different names are in Google Sheets? ›

How to use the COUNTUNIQUE formula in Google Sheets
  1. Type “=COUNTUNIQUE” or go to “Insert” → “Function” (or directly navigate to the “Functions” icon) → “Math” → “COUNTUNIQUE”.
  2. Select a range or an array in which you want to count the number of distinctive values.
  3. Press the “Enter” key.

How do you see the Google Forms you answered? ›

How to View Submitted Google Forms
  1. Navigate to the Responses Tab. Once you've opened your form, you'll see various tabs at the top of the page. ...
  2. View the Summary or Individual Responses. ...
  3. View in Sheets. ...
  4. Download the CSV file.

How do I export Google form answers to Excel? ›

In the Google Sheets interface, go to "File" > "Download" and then select "Microsoft Excel (. xlsx)." This will download the spreadsheet with all the form data onto your computer in Excel format.

How do I filter answers in Google Sheets? ›

Filter your data
  1. On your computer, open a spreadsheet in Google Sheets.
  2. To create a filter, select an option: Select a range of cells, then click Data. ...
  3. To see filter options, go to the top of the range and click Filter . ...
  4. To remove the filter, select an option:

Top Articles
Latest Posts
Article information

Author: Margart Wisoky

Last Updated:

Views: 5733

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Margart Wisoky

Birthday: 1993-05-13

Address: 2113 Abernathy Knoll, New Tamerafurt, CT 66893-2169

Phone: +25815234346805

Job: Central Developer

Hobby: Machining, Pottery, Rafting, Cosplaying, Jogging, Taekwondo, Scouting

Introduction: My name is Margart Wisoky, I am a gorgeous, shiny, successful, beautiful, adventurous, excited, pleasant person who loves writing and wants to share my knowledge and understanding with you.