Docs
Contents: Connect a sheet · Read · Filter, sort, page · Write · Keys and public APIs · CORS · Cache · Webhooks · Errors and limits · No-code tools
Connect a sheet
- Sign in and open the dashboard. It shows your service-account email (it ends in
.iam.gserviceaccount.com). - In Google Sheets, click Share and add that email. Viewer is enough to read. Choose Editor if you will add, update or delete rows through the API.
- Paste the sheet's URL in the dashboard. We check access, list the tabs and give you an endpoint
https://sheets.odelabs.dev/api/<id>.
The first non-empty row of each tab is the header: its cells become the JSON keys. Blank header
cells hide their column. Repeated headers get a suffix (email, email_2). Empty rows are
skipped.
Read
GET /api/<id> rows of the default tab, as a JSON array of objects
GET /api/<id>?sheet=Orders another tab (name as shown in Google Sheets)
GET /api/<id>/keys ["name", "email", ...]
GET /api/<id>/count {"rows": 42} (filters apply)
curl "https://sheets.odelabs.dev/api/<id>?limit=2"
[
{"name": "Ann", "age": 34, "active": true, "joined": "2026-11-21"},
{"name": "Bob", "age": 27, "active": false, "joined": "2025-01-05"}
]
Types. With "typed values" on (the default) numbers and booleans are JSON numbers and booleans,
and dates are ISO 8601 (2026-11-21, 2026-11-21T09:30:00). We recognise ISO,
month/day/year in US-locale sheets, day/month/year elsewhere and
day.month.year. Other text stays text. Empty cells are "". Formulas return their
computed value. With typed values off, every cell is the text Google Sheets displays ("$1,200.00").
Response headers: X-Total-Count (matching rows before limit/offset) and
X-Cache (HIT, MISS or STALE).
Filter, sort, page
?search[city]=Pune equals (case-insensitive; add case_sensitive=true) ?search[name]=An* * wildcard ?search[age]=>30 also >=, <, <=, != (URL-encode as %3E, %3C if your client needs it) ?search[age]=>30&search[city]=Pune all filters must match ?search[a]=1&search[b]=2&search_mode=or any filter may match ?sort_by=age&sort_order=desc numbers sort as numbers, empty cells last ?limit=20&offset=40
Numbers compare as numbers when both sides are numeric; otherwise text compares as text (ISO dates sort
correctly). SheetDB-style URLs work too: GET /api/<id>/search?city=Pune&age=>30, where
every parameter other than sheet, sort_by, sort_order, limit,
offset, search_mode and case_sensitive is a filter.
Write (Pro and Business)
Turn on "Allow writes" in the API's settings, share the sheet with Editor access, and use a key
with read + write access. Values are entered as if typed into Google Sheets (2026-11-21 becomes a
date, =A1*2 a formula). Add ?raw=true to store text exactly as sent.
# Append rows: an object, an array of objects, or {"data": ...}. Up to 1000 rows per request.
curl -X POST https://sheets.odelabs.dev/api/<id> -H "Authorization: Bearer sk_..." -H 'content-type: application/json' \
-d '{"data": [{"name": "Eve", "email": "eve@example.com", "age": 29}]}'
# 201 {"created": 1} unknown keys are skipped and listed in "ignored_columns"
# Update every row where email = eve@example.com (only the columns you send change)
curl -X PATCH https://sheets.odelabs.dev/api/<id>/email/eve@example.com -H "Authorization: Bearer sk_..." \
-H 'content-type: application/json' -d '{"age": 30}'
# {"updated": 1}
# Delete every row where name = Eve
curl -X DELETE https://sheets.odelabs.dev/api/<id>/name/Eve -H "Authorization: Bearer sk_..."
# {"deleted": 1}
Matching for PATCH and DELETE is exact and case-sensitive (numbers match numerically, so /id/7
matches 7.0). Add ?sheet=Tab to write to another tab. Every write clears this API's
cache, so the next read shows it.
Keys and public APIs
Send a key as Authorization: Bearer sk_.... Keys created on an API's page work only for that API
(read-only or read + write). Keys created on the Account page use scopes: * (the default) works for all your APIs, api:*:read reads all of them, and api:<id>:read / api:<id>:* one API.
Turn on Public read to allow GET without a key, for example from a static website. Writes always need a key. Never put a key in browser code: anyone can read it there.
// Server-side (Node 18+, Deno, Cloudflare Workers ...)
const res = await fetch("https://sheets.odelabs.dev/api/<id>?search[status]=open", {
headers: { Authorization: `Bearer ${process.env.SHEET_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).message);
const rows = await res.json();
// Browser, public API
const rows = await (await fetch("https://sheets.odelabs.dev/api/<id>?limit=50")).json();
CORS
With no allowed origins set, any website can call a public API from the browser. Set allowed origins (for example
https://example.com https://www.example.com) and only those get CORS headers. A request that carries
another Origin header is refused with 403 before it counts against your plan. Server-side
calls send no Origin and are not affected.
Cache and Google's limits
Google limits how often an app may read sheets (per minute). So we cache every tab for the API's cache TTL:
60 s by default, 10 s to 10 min depending on plan. Identical requests that arrive together share one Google read.
Writes through the API clear the cache at once; edits made in Google Sheets appear after the TTL (or click
"Refresh tabs and clear cache" in the dashboard). When Google rate-limits us we retry with backoff, and if it
still fails we serve the last copy (X-Cache: STALE) rather than an error.
Webhooks (Pro and Business)
Set a webhook URL and a key column (a unique id or email column) in the API's settings. About once a minute we compare the default tab with the previous check and POST the differences:
POST https://your-app.example.com/hooks/sheet
x-sheet-timestamp: 1763712000
x-sheet-signature: v1=5d41402abc4b2a76b9719d911017c592...
content-type: application/json
{"event": "rows.changed", "api_id": "a1b2c3d4e5f6", "sheet": "Orders",
"added": [{"id": 8, "status": "new"}],
"changed": [{"key": "7", "before": {"id": 7, "status": "new"}, "after": {"id": 7, "status": "shipped"}}],
"removed": [], "truncated": false, "sent_at": 1763712000}
The signature is HMAC-SHA256 of "<timestamp>.<raw body>" with the API's webhook secret
(whsec_..., on the API's page). Check it, and reject old timestamps to stop replays:
import crypto from "node:crypto";
function verify(rawBody, headers, secret) {
const ts = headers["x-sheet-timestamp"];
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
const want = "v1=" + crypto.createHmac("sha256", secret).update(`${ts}.${rawBody}`).digest("hex");
const got = headers["x-sheet-signature"] || "";
return got.length === want.length && crypto.timingSafeEqual(Buffer.from(got), Buffer.from(want));
}
Without a key column, rows are matched by row number, so inserting a row in the middle reports every row below it
as changed. Each list holds at most 500 rows ("truncated": true when there were more). Failed
deliveries are retried twice; the last result is shown on the API's page. Webhook URLs must be public
https:// or http:// addresses; redirects are not followed.
Errors and limits
Errors are JSON: {"error": "code", "message": "..."}.
| Status | error | Meaning |
|---|---|---|
| 400 | bad_request | Bad query, unknown column, invalid JSON body |
| 401 | unauthorized | No key or a wrong key on a private API, or a write without a key |
| 402 | plan_limit / feature_required | Monthly requests used up, or writes on a plan without them; includes upgrade_url |
| 403 | forbidden | Key of another account or scoped to another API, origin not allowed, writes switched off |
| 404 | not_found / unknown_sheet | No such API, or no tab with that name |
| 429 | rate_limited | Over your plan's requests per minute; see Retry-After |
| 502 | sheet_not_shared / sheet_not_found / upstream_error | Google refused or failed; not counted against your plan |
| 503 | upstream_quota | Google's rate limit, and there is no cached copy yet; see Retry-After |
Per-minute rates: Free 30, Starter 120, Pro 300, Business 600 requests per minute, per key (anonymous calls to a public API share one budget per API). Tabs can have up to 50,000 rows.
No-code tools
Most tools only need the URL. Make the API public read and set allowed origins to your site's domain, or use a key where the tool keeps it server-side.
Webflow
Add an Embed element with a small script that fetches the public URL and fills your layout:
<div id="team"></div>
<script>
fetch("https://sheets.odelabs.dev/api/<id>?sort_by=name")
.then(r => r.json())
.then(rows => {
document.getElementById("team").innerHTML = rows
.map(p => `<div class="card"><h3>${p.name}</h3><p>${p.role}</p></div>`).join("");
});
</script>
Escape the text if people other than you can edit the sheet.
Framer
Use a Code Component (or Framer's Fetch feature) with the public URL; each row is a plain object, so
rows.map(r => r.title) is all you need. Set allowed origins to your framer.website or
custom domain.
Glide, Softr and similar app builders
Point their JSON / REST API data source at https://sheets.odelabs.dev/api/<id>. If the tool lets you set
headers, use a read-only key and keep the API private.
Zapier, Make, n8n
Use the generic HTTP step ("Webhooks by Zapier" → Custom Request, Make's HTTP module, n8n's HTTP Request node):
Method: POST
URL: https://sheets.odelabs.dev/api/<id>
Headers: Authorization: Bearer sk_... Content-Type: application/json
Body: {"data": [{"name": "{{1.name}}", "email": "{{1.email}}"}]}
To start a Zap when rows change, set the Zap's "Catch Hook" URL as this API's webhook URL (Pro).