Bosco Labs

Tools › Data tools

Google Sheets Export: send any Apify dataset to a spreadsheet

Coming soon to the Store

Export any Apify dataset to Google Sheets in one run: the results of any scraper go straight into your spreadsheet, as a fresh copy (replace) or added below what's already there (append). For anyone who reports, shares or post-processes scraped data in Sheets. Nested fields become their own columns, appends keep your header, and Google's rate limits are retried automatically instead of failing the run.

Price$0.00015 per row exported
DomainData tools
Call itApify API or MCP

Pricing (pay per event): $0.00015 per row exported ($0.15 per 1,000 rows). No start fee; the run stops at your max charge limit.

Coming soon to the Apify StoreAsk for early access

Questions agents ask

  • “Put the results of my last Google Maps run into the 'Leads' tab of my spreadsheet, only name, phone and website.”
  • “Replace the 'Daily' tab with today's scraper results.”
  • “Append this week's new listings below the existing rows.”

Example

Input

{
  "datasetId": "aBcD1234efGH5678i",
  "spreadsheetId": "1AbCdEfGhIjKlMnOpQrStUvWxYz0123456789",
  "sheetName": "Leads",
  "mode": "append",
  "serviceAccountJson": "{ \"type\": \"service_account\", ... }",
  "fields": ["name", "address.city", "phone", "website"]
}

Output

{"spreadsheetUrl": "https://docs.google.com/spreadsheets/d/1AbC...", "sheetName": "Leads", "rowsWritten": 1250, "columns": ["name", "address.city", "phone", "website"]}

What you get

The run writes no dataset rows. Its key-value store gets an OUTPUT record with spreadsheetUrl, sheetName, rowsWritten and columns. Nested objects become parent.child columns, arrays are written as JSON text, and values are never written as formulas.

Coverage

Any Apify dataset, written with your own Google service account (the sheet shared with it as Editor). Google allows 10 million cells per spreadsheet; rows are sent in batches of up to 5,000 rows or 2 MB.

Use with AI agents (MCP)

Add this URL to your MCP client (Claude, Cursor, VS Code, ...) to load the Actor as a tool through the Apify hosted MCP server. It signs you in with OAuth or accepts Authorization: Bearer <APIFY_TOKEN>. It works once the Actor is live on the Apify Store.

https://mcp.apify.com?tools=bosco_labs/sheets-export

For “Put the results of my last Google Maps run into the 'Leads' tab of my spreadsheet, only name, phone and website.” the agent passes:

{"datasetId": "<dataset ID>", "spreadsheetId": "<spreadsheet ID>", "sheetName": "Leads", "mode": "append", "serviceAccountJson": "<service account JSON key>", "fields": ["title", "phone", "website"]}

the run writes no dataset rows; its OUTPUT record in the key-value store holds spreadsheetUrl, sheetName, rowsWritten and columns, so the agent can link the sheet. serviceAccountJson is required, so the key passes through the agent's tool call: use a service account that is shared only on the sheets the agent may write to.

Or call the Apify API: POST https://api.apify.com/v2/acts/bosco_labs~sheets-export/run-sync-get-dataset-items with the input as JSON body. Cost: $0.00015 per row exported.

Input fields

FieldTypeMeaning
datasetIdstring (required)Apify dataset ID to export, e.g. "aBcD1234efGH5678i": usually the defaultDatasetId of a scraper run (Storage tab).
spreadsheetIdstring (required)Google spreadsheet ID: the part between /d/ and /edit in the sheet URL docs.google.com/spreadsheets/d/<ID>/edit, e.g. "1AbCdEfGhIjKlMnOpQrStUvWxYz0123456789". The full sheet URL also works.
sheetNamestringName of the tab to write to, e.g. "Leads". Created if it doesn't exist. Leave empty to use the first tab (whatever it is called, e.g. "Sheet1" or "Blad1").
modestring"replace" (default) clears the tab's values and writes the dataset; "append" adds rows below the existing data, keeps your header and adds any new columns on the right.
serviceAccountJsonstring (required)Full contents of a Google service account JSON key file (secret input, stored encrypted). Share the spreadsheet with that account's client_email as Editor first. See the README for the 2-minute setup.
fieldsarrayColumns to export, in this order; nested fields use dots, e.g. ["name", "address.city", "phone"]. Empty = all fields.

Sources, licence and limits

I get "Google returned 403" or "404". The sheet isn't shared with the service account, or the spreadsheet ID is wrong. The error message shows the exact email to share it with, as Editor.

"Google Sheets API has not been used in project ... or it is disabled". Do setup step 2 in the same Google Cloud project as the key.

How many rows can I export? Google allows 10 million cells per spreadsheet (rows x columns, across all tabs). Rows are sent in batches of up to 5,000 rows or 2 MB.

What happens on rate limits? Google answers 429 when you write too fast. The Actor waits and retries (up to 5 times, after 1, 2, 4, 8 and 16 seconds), also on Google server errors.

Very long text? Google rejects cells over 50,000 characters, so longer values are cut at 50,000 characters instead of failing the run.

Does replace mode delete formatting? No, only cell values are cleared. Formatting, charts and other tabs stay.

Is my key safe? It's a secret input (encrypted by Apify), it's only used to request a Sheets access token from Google, and it's never logged or saved. Delete the key in Google Cloud whenever you want to revoke access.

Coming soon to the Apify StoreAsk for early access