Public
Likesheet-to-json
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v113View latest version
A lightweight HTTP API that converts public Google Sheets into JSON.
GET /csv/:sheetId
GET /csv/:sheetId?gid=123456789
:sheetId— The Google Sheet ID from the URL (e.g.,1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms)gid(optional) — The tab/sheet ID. Defaults to0(first tab). Find this in the sheet URL after#gid=.
curl https://sheet-json.val.run/csv/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms
Returns a JSON array of objects, where keys are the column headers from the first row.
- The Google Sheet must be publicly accessible ("Anyone with the link" sharing).
- Private sheets will return an error.
| Route | Description |
|---|---|
GET / | Health check — returns { "ok": true } |
GET /csv/:sheetId | Fetch sheet as JSON |
GET /source | Redirect to val source code |
Rendering mermaid diagram...