# 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: 2026-07-07 · Source: <https://pastesheet.com/guides/convert-google-sheet-to-rest-api>*

## 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](https://developers.google.com/workspace/sheets/api/limits))
- Google's API requires a **Google Cloud project plus OAuth credentials or a service account** before it will return a single row. ([source](https://developers.google.com/workspace/sheets/api/guides/authorizing))
- 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](https://pastesheet.com/tools/google-sheets-to-json) gives you the file directly. Come back here when you need it to stay in sync.

## From sheet to endpoint

1. Make sure your sheet has a header row — those become your JSON keys.
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. Copy the sheet URL and paste it into PasteSheet. It fetches a preview and infers each column's type.
4. Save the endpoint. You now have a live URL like `https://pastesheet.com/api/your-endpoint-id`.
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:

```javascript
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](https://pastesheet.com/guides/google-sheets-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

- [Usage limits — Google Sheets API](https://developers.google.com/workspace/sheets/api/limits) — Google
- [Authorize requests — Google Sheets API](https://developers.google.com/workspace/sheets/api/guides/authorizing) — Google

## Related guides

- [Turn Google Sheets Into a REST API (No Code)](https://pastesheet.com/guides/google-sheets-rest-api) — Turn a public or restricted Google Sheet into a live JSON REST API with filtering, sorting, and pagination — no backend, no code.
- [Google Sheets API Pricing: Is It Free?](https://pastesheet.com/guides/is-google-sheets-api-free) — Google Sheets API pricing, straight: standard use costs nothing, but quotas and setup do. What is actually free, what is capped, and where the real cost lands.
- [How to Use Google Sheets as a Database](https://pastesheet.com/guides/google-sheets-as-a-database) — Use Google Sheets as a database: query rows over a cached REST API with filters, sorting, and paging — no backend. When it fits, when it doesn't, and how.

---

[PasteSheet](https://pastesheet.com) turns any Google Sheet into a live REST API and MCP server for AI agents — no backend, no code. Canonical HTML version of this page: <https://pastesheet.com/guides/convert-google-sheet-to-rest-api>
