Return data from a region#
Deprecated
This endpoint is deprecated and may be removed in a future release.
This endpoint was deprecated on 2026-02-12.
It is scheduled for sunset on 2029-01-31.
Description#
Returns all data from a region, paging if necessary.
When paging, the revision parameter must be set and the per_page parameter indicates the maximum number of cells to include in a single response. The server enforces a maximum per_page of 50,000. An unbounded region may only be used to obtain the first page of results. Use the paged_region or next_url from the first page to retrieve subsequent pages. All cells in the requested region will appear exactly once during the paging process, however ordering is not guaranteed.
GET /spreadsheets/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region}
Required OAuth Scopes
data_tables|r
Parameters#
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
X-Version |
header |
string |
false |
Version of the API (2022-01-01) |
spreadsheetId |
path |
string |
true |
The unique identifier of the spreadsheet |
sheetId |
path |
string |
true |
The unique identifier of the sheet |
region |
path |
string |
true |
A1 style representation of a cell or range. A range may be unbounded in any/all directions by leaving off the corresponding column or row. Unbounded ranges will be clamped to the data in the queried region. |
value_style |
query |
string |
false |
The style of cell value to return. |
revision |
query |
integer(int32) |
false |
The spreadsheet revision from which to select data. If no revision is provided, the latest revision will be selected. |
page |
query |
integer(int32) |
false |
The page of results to return. |
per_page |
query |
integer(int32) |
false |
The number of items to return per page. Leave blank for no limit, returning all results. |
Detailed descriptions#
region: A1 style representation of a cell or range. A range may be unbounded in any/all directions by leaving off the corresponding column or row. Unbounded ranges will be clamped to the data in the queried region.
Cell Syntax: [Column][Row]
Range Syntax: [Start Column][Start Row]:[Stop Column][Stop Row]
Examples:
The region
A1selects data in the cellA1The region
A2:D8selects all data in the range betweenA2andD8(inclusive)The region
A:Aselects all data in columnAThe region
1:3selects all data in rows1through3The region
B3:selects all data below and to the right ofB3(inclusive)The region
:selects all data in the sheet
Be sure to URL encode the region to avoid misinterpretation of the :.
value_style: The style of cell value to return.
For example, if a cell’s value is =1+1 you can use:
rawto get the raw value=1+1calculatedto get the calculated value2
Calculated values will be returned by default.
Enumerated Values#
Parameter |
Value |
|---|---|
value_style |
|
value_style |
|
Code Samples#
curl -X GET https://api.app.wdesk.com/spreadsheets/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-H 'X-Version: 2022-01-01'
http GET https://api.app.wdesk.com/spreadsheets/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region} \
X-Version:2022-01-01 \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=GET "https://api.app.wdesk.com/spreadsheets/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region}" \
--output-document - \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'X-Version: 2022-01-01'
import requests
headers = {
'X-Version': '2022-01-01',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('https://api.app.wdesk.com/spreadsheets/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}/data/{region}', headers = headers)
print(r.json())
Returns#
200 - OK#
Returns a JSON object with the following properties:
data- Containsrangeandvaluesproperties.rangecontains an A1 style representation of the range containing this data.valuescontains a row-major ordered multidimensional array of cell values.next_url- A fully qualified URL, including next page of results. If there is no next page to query for, this will be empty.page- The one based page index that the result corresponds to. Only included during paging.paged_region- The entire region that the collection of pages represents. Only included during data paging.per_page- The maximum number of items in a page. A page is not guaranteed to have exactly this many items. Only included during paging.revision- The revision number of this spreadsheet.
400 - Bad Request#
An ErrorResponse object containing a message and list of errors.
403 - Forbidden#
An ErrorResponse object containing a message and list of errors.
404 - Not Found#
An ErrorResponse object containing a message and list of errors.
500 - Internal Server Error#
An ErrorResponse object containing a message and list of errors.
Example Responses#
{
"data": {
"range": "A1:B2",
"values": [
[
"Row1-Column1 Data",
"Row1-Column2 Data"
],
[
"Row2-Column1 Data",
"Row2-Column2 Data"
]
]
},
"next_url": "https://api.app.wdesk.com/spreadsheets/v1/spreadsheets/567nd179ed984eb5a52aaaba5f83a230/sheets/k78a604b74564afa76b5ba96755123456/data/A1%3AB20?page=2&per_page=1&revision=3",
"page": 2,
"paged_region": "A1:B20",
"per_page": 1,
"request_id": "d6a6ce3f-f120-4104-9587-a5a2dc45626c",
"revision": 3
}