# Google Sheets to JSON & Dataset: Public Sheets, No Login (`keel-data/public-google-sheets`) Actor

Turn any public Google Sheet (shared by link or published to the web) into clean JSON rows: one row per line, every tab or just the ones you name, numbers and TRUE/FALSE typed, with row numbers. No Google account, no API key. Pay only per row.

- **URL**: https://apify.com/keel-data/public-google-sheets.md
- **Developed by:** [Keel Data](https://apify.com/keel-data) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.07 / 1,000 rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Sheets to JSON & Dataset: Public Sheets, No Login

Turn any **public Google Sheet** into clean JSON rows. You don't need a Google account, an API key or a sign-in. Paste the sheet link and get one row per line, keyed by the column names. You can read the first tab, every tab, or only the tabs you name.

**You pay only per row delivered.** Private sheets, missing tabs and empty tabs are free and explained in the output.

### What it does

- **Reads public sheets:** sheets shared as "Anyone with the link" and sheets **published to the web** (`/d/e/2PACX-.../pubhtml`).
- **Any link works:** the `/edit` link, a link to one tab (`#gid=123`), a published link, or a bare spreadsheet ID.
- **Tabs:** the tab in your link, every tab, or only the tabs you name (not case-sensitive).
- **Typed values:** numbers become numbers, `TRUE`/`FALSE` become booleans and empty cells become `null`. Values with leading zeros (zip codes, IDs) stay as text. Switch typing off to get every value exactly as shown in the sheet.
- **Messy headers handled:** blank column names become `column_2`, and repeated names become `Title_2`. If your table starts lower down, pick the header row.
- **Row numbers:** each row carries the sheet row it came from (`_meta.rowNumber`), so you can trace any value back to the sheet.
- **Clear errors:** a private sheet tells you exactly which sharing setting to change.

Good for: feeding sheet data to AI agents and automations, syncing a shared price list or catalogue into your pipeline, monitoring a public sheet on a schedule, and using sheet data as input for other Actors.

### How to use it

1. Make sure the sheet is shared as **Anyone with the link (Viewer)** or published with **File → Share → Publish to web**.
2. Paste one or more links into **Google Sheets links**.
3. Optionally switch on **Read every tab** or list **Only these tabs**, then run. Download the rows as JSON, CSV or Excel, or connect them to Make, Zapier, n8n or your own code.

#### Example input

```json
{
  "sheetUrls": ["https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"],
  "allTabs": true,
  "headerRow": 1,
  "typedValues": true
}
```

#### Example output (one item per sheet row)

```json
{
  "Student Name": "Alexandra",
  "Gender": "Female",
  "Class Level": "4. Senior",
  "Home State": "CA",
  "Major": "English",
  "Extracurricular Activity": "Drama Club",
  "_status": "ok",
  "_meta": { "spreadsheetId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms", "tab": "Class Data", "gid": 0, "rowNumber": 2 }
}
```

A sheet or tab that can't be read gives one free row with `_status: "error"` (or `"empty"`) and the reason in `_error`.

### Pricing

Pay per event: one **row** event per sheet row delivered. No start fee and no extra platform-usage charge. You can set a maximum cost per run; the Actor stops cleanly when it's reached.

### Limits and notes

- Only sheets you can open in a private browser window without signing in can be read. The Actor never writes to your sheets.
- Values are read as shown in the sheet (formatted values), not as formulas.
- Not affiliated with Google. Google Sheets is a trademark of Google LLC.

Made by Keel Data: data tools that don't break.

# Actor input Schema

## `sheetUrls` (type: `array`):

Links to sheets shared as "Anyone with the link" or published to the web, or bare spreadsheet IDs. A link that ends in #gid=123 reads that tab. Up to 500 per run.

## `allTabs` (type: `boolean`):

Read all tabs of each sheet. Off = only the tab in the link (#gid=), or the first tab.

## `tabNames` (type: `array`):

Read only the tabs with these names (not case-sensitive). Overrides "Read every tab".

## `headerRow` (type: `integer`):

Which row holds the column names (1 = the first row). 0 = no header row; columns are named column_1, column_2 ...

## `typedValues` (type: `boolean`):

Turn numbers into numbers and TRUE/FALSE into booleans, and empty cells into null. Values with leading zeros (zip codes, IDs) stay text. Off = every value is text, exactly as shown in the sheet.

## `includeMeta` (type: `boolean`):

Adds a \_meta field with the spreadsheet ID, tab name, gid and the row number in the sheet.

## `maxRowsPerTab` (type: `integer`):

Stop after this many rows in each tab. 0 = all rows.

## Actor input object example

```json
{
  "sheetUrls": [
    "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"
  ],
  "allTabs": false,
  "tabNames": [],
  "headerRow": 1,
  "typedValues": true,
  "includeMeta": true,
  "maxRowsPerTab": 0
}
```

# Actor output Schema

## `rows` (type: `string`):

One item per sheet row, keyed by the column names. Rows with \_status "error" or "empty" explain a sheet or tab that could not be read (free).

## `runStats` (type: `string`):

Per tab: rows found and delivered, and any error.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sheetUrls": [
        "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("keel-data/public-google-sheets").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "sheetUrls": ["https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"] }

# Run the Actor and wait for it to finish
run = client.actor("keel-data/public-google-sheets").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sheetUrls": [
    "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit"
  ]
}' |
apify call keel-data/public-google-sheets --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,keel-data/public-google-sheets"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/enBkzK2bmygakBj9i/builds/idEgnty9mJXvVIrpE/openapi.json
