Google Sheets API

Google Sheets API

Read, write, and format Google Sheets data

Overview

The Google Sheets API endpoint allows you to interact with Google Sheets directly through the AnyAPI platform. This API enables you to perform various operations on Google Sheets, such as reading, writing, and updating data, without the need to directly integrate with the Google Sheets API.

Features

  • Comprehensive Functionality: Google sheets automation API supports a wide range of operations, including reading, writing, updating, and deleting Google Sheets data.
  • Simple and Accessible: The API provides a straightforward and easy-to-use interface, abstracting away the complexities of the underlying Google Sheets API.
  • Seamless Integration: Google spreadsheet API can be easily integrated into various application architectures, including web applications, mobile apps, and server-side systems.
  • Scalable and Reliable: Sheets API is built on top of a scalable and highly available infrastructure, ensuring reliable performance and uptime.

Getting Started

To access the Google Sheets API , you need to obtain an API key from AnyAPI.io. The API key is used for authentication and should be included in the request URL as a query parameter.

Let’s Try Sign In.

Delete an existing row endpoint

Send a DELETE request to the following URL to Delete an existing row

curl --request DELETE \
  --url 'https://anyapi.io/api/v1/google-sheets/%7BdocId%7D/%7BsheetTitle%7D/%7BrowId%7D?apiKey=YOUR_API_KEY'

Request parameters

Use the parameters listed below to customize your request. Mandatory parameters are indicated

docIdstringRequired
The Document ID.
sheetTitlestringRequired
The name of the Google Sheet to delete a row from.
rowIdnumberRequired
The ID of the row to delete.
apiKeystringRequired
Your unique API key, which is required to authenticate your requests.

Response parameters

The API returns its response in a simple, lightweight JSON format.

Convert a sheet to JSON endpoint

Send a GET request to the following URL to Convert a sheet to JSON

curl --request GET \
  --url 'https://anyapi.io/api/v1/google-sheets/%7BdocId%7D/%7BsheetTitle%7D?apiKey=YOUR_API_KEY'
{
  "title": "My Datasets Sheet",
  "locale": "en-US",
  "sheets": [
    "Datasets",
    "Reviews",
    "Update v1"
  ]
}

Request parameters

Use the parameters listed below to customize your request. Mandatory parameters are indicated

docIdstringRequired
The Document ID.
sheetTitlestringRequired
The name of the Google Sheet to convert to JSON.
apiKeystringRequired
Your unique API key, which is required to authenticate your requests.

Response parameters

The API returns its response in a simple, lightweight JSON format.

titlestring
The title of document.
localestring
The locale of the spreadsheet is set to "en-US", which indicates that the data and formatting are in English (United States).
sheetsobject
The Google Spreadsheet contains the following three sheets.

Create a new row endpoint

Send a POST request to the following URL to Create a new row

curl --request GET \
  --url 'https://anyapi.io/api/v1/google-sheets/%7BdocId%7D/%7BsheetTitle%7D?apiKey=YOUR_API_KEY'

Request parameters

Use the parameters listed below to customize your request. Mandatory parameters are indicated

docIdstringRequired
Document ID
sheetTitlestringRequired
Sheet Title
rowobjectRequired
The row object to create
apiKeystringRequired
Your unique API key, which is required to authenticate your requests.

Response parameters

The API returns its response in a simple, lightweight JSON format.

messagestring
Row created

Document details endpoint

Send a GET request to the following URL to Document details

curl --request GET \
  --url 'https://anyapi.io/api/v1/google-sheets/%7BdocId%7D?apiKey=YOUR_API_KEY'
{
  "title": "My Datasets Sheet",
  "locale": "en-US",
  "sheets": [
    "Datasets",
    "Reviews",
    "Update v1"
  ]
}

Request parameters

Use the parameters listed below to customize your request. Mandatory parameters are indicated

docIdstringRequired
The document ID
apiKeystringRequired
Your unique API key, which is required to authenticate your requests.

Response parameters

The API returns its response in a simple, lightweight JSON format.

titlestring
The title of document.
localestring
The locale of the spreadsheet is set to "en-US", which indicates that the data and formatting are in English (United States).
sheetsobject
The Google Spreadsheet contains the following three sheets.

Response and error codes

Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.

Status CodeTypeDetails
200OKThe request was successful.
400Bad RequestThe request was invalid or cannot be otherwise served.
401UnauthorizedAuthentication credentials were missing or incorrect.
422Quota reachedThe request cannot be served due to the application's rate limit having been exhausted for the resource.
404Not FoundThe requested resource could not be found.
429Too Many RequestsThe request cannot be served due to the application's rate limit having been exhausted for the resource.
500Internal Server ErrorSomething went wrong on the server.
503Service UnavailableThe service is temporarily unavailable.