API reference
POST /api/v1/getsheet
Authenticate with a bearer API key, pass sheetRef and hasHeader, and receive a JSON array.
By Zainul Ariffin
Request
cURL
curl --request POST \
--url https://www.sheetsdb.io/api/v1/getsheet \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"sheetRef": "GOOGLE_SHEET_URL_OR_ID",
"hasHeader": true
}'Send the request from a server or local script. Browser requests expose the API key to anyone who can inspect the page.
JSON body
| Field | Type | Required | Meaning |
|---|---|---|---|
sheetRef | string | Yes | A public shared URL, published URL, or spreadsheet ID. |
hasHeader | boolean | No | When true, the first row supplies object keys. The default is false. |
Success response
A successful request returns HTTP 200 and a JSON array.
200 · application/json
[
{
"name": "Ada",
"role": "Engineer"
}
]Headers and errors
Every response includes an X-Request-ID. Responses to authenticated requests also include rate-limit headers. See the limits and errors reference for status codes and retry behavior.