PasteSheet icon PasteSheet logo mark — a spreadsheet grid with a curly brace on a green rounded square PasteSheet

Convert a Google Sheet to a REST API

You do not need Apps Script or a service account to get JSON out of a Google Sheet. Here is the fastest path from spreadsheet to a working, queryable REST endpoint.

Last updated

Key facts

  • Google's Sheets API is cell-oriented: it reads ranges like A1:D50, not records. Reassembling those into row objects is work you do yourself. source
  • Google's API requires a Google Cloud project plus OAuth credentials or a service account before it will return a single row. source
  • Converting a sheet with PasteSheet takes neither: the header row becomes your JSON keys, each row becomes a typed object, and the endpoint stays pointed at the live sheet — edits appear once the cache TTL (30 seconds to 1 hour) expires.
  • PasteSheet's Free plan covers 3 endpoints and 2,000 requests a month, with MCP included — no credit card, no expiry.

How do you convert a Google Sheet to a REST API?

Share the sheet so anyone with the link can view it, paste that URL into PasteSheet, and it publishes the rows as JSON at a REST endpoint. The header row becomes your JSON keys, each row becomes an object, and you can filter, sort, and paginate with query parameters.

The conversion is not a one-time export — the endpoint stays pointed at the live sheet. Edit a cell and the change appears through the API once the cache expires, which you can tune from 30 seconds to an hour.

If you only need the JSON once, you do not need an endpoint or an account at all: the free Google Sheets to JSON converter gives you the file directly. Come back here when you need it to stay in sync.

From sheet to endpoint

  1. 1 Make sure your sheet has a header row — those become your JSON keys.
  2. 2 In Google Sheets, set sharing to Anyone with the link → Viewer — PasteSheet reads the sheet over Google's public export URL, so this step is required.
  3. 3 Copy the sheet URL and paste it into PasteSheet. It fetches a preview and infers each column's type.
  4. 4 Save the endpoint. You now have a live URL like https://pastesheet.com/api/your-endpoint-id.
  5. 5 Call it from your app and add query parameters to filter, sort, and paginate.

Fetch it from your app

A plain fetch returns typed JSON you can render directly:

app.js
const res = await fetch(
  'https://pastesheet.com/api/your-endpoint-id?sort=created&order=desc&limit=20'
);
const { data, total } = await res.json();

What about updates?

Edit the spreadsheet as usual — the endpoint reflects changes after the cache TTL (5 minutes on Free, tunable on paid plans), or immediately after a manual refresh. For the full parameter reference, see using Google Sheets as a REST API.

Frequently asked questions

Do I need to code anything to convert a sheet?

No. You share the sheet, paste its URL into PasteSheet, and save. The REST endpoint is generated for you.

Does my sheet need to be link-shared?

Yes — set it to Anyone with the link → Viewer, because PasteSheet reads it through Google's public export URL rather than authenticating to your Drive. The endpoint you publish can still be private and require a bearer key.

How do updates to the sheet propagate?

Edits appear after the endpoint's cache TTL expires, or right away if you trigger a manual refresh in PasteSheet.

Sources

Related guides

Turn your sheet into an API in minutes

Paste a Google Sheet URL and get a live REST API and MCP server — no backend, no code, free to start.