sheet-to-json

A lightweight HTTP API that converts public Google Sheets into JSON.

Usage

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 to 0 (first tab). Find this in the sheet URL after #gid=.

Example

curl https://sheet-json.val.run/csv/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms

Returns a JSON array of objects, where keys are the column headers from the first row.

Requirements

  • The Google Sheet must be publicly accessible ("Anyone with the link" sharing).
  • Private sheets will return an error.

Endpoints

RouteDescription
GET /Health check — returns { "ok": true }
GET /csv/:sheetIdFetch sheet as JSON
GET /sourceRedirect to val source code

Architecture

Rendering mermaid diagram...