Open documentation ↗Overview
Reads and writes Google Sheets.
Google Sheets API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 17 endpoints.
At a glance
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Analytics
- Base URL
https://sheets.googleapis.com/- Version
- v4
- Endpoints
- 17
- OpenAPI
- Specification ↗
- Spec updated
- 2023-04-21
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://sheets.googleapis.com/v4/spreadsheets/SPREADSHEETID" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://sheets.googleapis.com/v4/spreadsheets/SPREADSHEETID", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://sheets.googleapis.com/v4/spreadsheets/SPREADSHEETID",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /v4/spreadsheets | Creates a spreadsheet, returning the newly created spreadsheet. |
| GET | /v4/spreadsheets/{spreadsheetId} | Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default, data within grids is not returned. You can include grid data in |
| GET | /v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId} | Returns the developer metadata with the specified ID. The caller must specify the spreadsheet ID and the developer metadata's unique metadataId. |
| POST | /v4/spreadsheets/{spreadsheetId}/developerMetadata:search | Returns all developer metadata matching the specified DataFilter. If the provided DataFilter represents a DeveloperMetadataLookup object, this will return all D |
| POST | /v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo | Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet. |
| GET | /v4/spreadsheets/{spreadsheetId}/values/{range} | Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range. |
| PUT | /v4/spreadsheets/{spreadsheetId}/values/{range} | Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption. |
| POST | /v4/spreadsheets/{spreadsheetId}/values/{range}:append | Appends values to a spreadsheet. The input range is used to search for existing data and find a "table" within that range. Values will be appended to the next r |
| POST | /v4/spreadsheets/{spreadsheetId}/values/{range}:clear | Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared -- all other properties of the cell (such as for |
| POST | /v4/spreadsheets/{spreadsheetId}/values:batchClear | Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. Only values are cleared -- all other |
| POST | /v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter | Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges matching any of the speci |
| GET | /v4/spreadsheets/{spreadsheetId}/values:batchGet | Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. |
| POST | /v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter | Returns one or more ranges of values that match the specified data filters. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges that |
| POST | /v4/spreadsheets/{spreadsheetId}/values:batchUpdate | Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more ValueRanges. |
| POST | /v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter | Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges. |
| POST | /v4/spreadsheets/{spreadsheetId}:batchUpdate | Applies one or more updates to the spreadsheet. Each request is validated before being applied. If any request is not valid then the entire request will fail an |
| POST | /v4/spreadsheets/{spreadsheetId}:getByDataFilter | Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. This method differs from GetSpreadsheet in that it allows selecting which s |
Questions
Does the Google Sheets API API need an API key?
Yes. The Google Sheets API API uses OAuth authentication; the documentation explains how to get credentials.
Does the Google Sheets API API support HTTPS?
Yes, the Google Sheets API API is served over HTTPS.
How many endpoints does the Google Sheets API API have?
Its OpenAPI description lists 17 endpoints in version v4. All of them are shown on this page.
What are alternatives to the Google Sheets API API?
Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.
Similar analytics APIs
Compare alternatives →Google Play Integrity API
AnalyticsThe Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.
versionhistory.googleapis.com API
AnalyticsVersion History API - Prod
Doc Converter
AnalyticsThis api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)
Perspective Comment Analyzer API
AnalyticsThe Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.
Safe Browsing API
AnalyticsEnables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.
Web Fonts Developer API
AnalyticsThe Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.
Listed from APIs.guru (CC0).