Google Sheets Import and Export for Apify
Pricing
$5.00 / 1,000 results
Google Sheets Import and Export for Apify
Import tabs from a shared workbook, or export a dataset: append below the last entry, replace a tab, or merge by ID. Needs a service account for writing; public links read freely.
Pricing
$5.00 / 1,000 results
Rating
0.0
(0)
Developer
BEPO Labs
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
π What is Google Sheets Import and Export?
Move data between Apify and Google Sheets in both directions. Export pushes a dataset into your document; import returns each row as an item, named by the header. It talks to the official API, so nothing passes via a third party, and AI agents can call it using the Apify MCP server.
- Scraper results delivered: send the dataset of any Actor run to the sheet your team already uses, after every scheduled run
- Keep a sheet up to date: upsert by a key such as URL or product ID: changed rows are updated in place, new ones are appended, nothing is duplicated
- Sheets as input: read a list of URLs, keywords or products from a sheet and feed it into another Actor
- Reports and dashboards: keep a Looker Studio or Sheets dashboard fed with fresh rows without copy and paste

β¨ Why use this Actor?
- β
Upsert by key: rows with the same
keyColumnvalue are updated in place, cells of columns the row lacks stay, new keys are appended - β New columns join by themselves: the existing header is kept and new fields are added to the right, so a scraper that adds a field does not break your sheet
- β
Dry run first:
dryRunplans the write and shows a preview in the run summary; nothing is written and only the run is charged - β Runs that finish: chunked writes and retries with exponential backoff on Google's quota (429) and server errors; a wrong share or range stops at once with a message that says what to fix
- β Your own Google setup: a service account key you control, no OAuth pop-up and no token stored by a third party; public sheets import without one
π¦ What data can you get with Google Sheets Import and Export?
| π€ Every column of the sheet, named by the header row | π Column letters (A, B, ...) when headerRow is off | π§© Empty header cells as column_C, duplicates as name_2 |
| π§Ύ Export summary: rows written, appended, updated, skipped | π Link to the sheet that was written |
Import fills the dataset. Export writes to your sheet and puts its run summary into the key-value store (
OUTPUT).
π How to use Google Sheets Import and Export
Google Sheets Import and Export works in a few clicks, no coding needed:
- Create a free Apify account (the free plan includes 5 USD of monthly credit).
- Open Google Sheets Import and Export and click Try for free.
- Pick
exportorimport, paste the sheet's URL and, for export, the dataset ID and your service account key. - Click Start and wait for the run to finish (most runs take seconds).
- Download your data as JSON, CSV, Excel, XML or HTML, or send it straight to Google Sheets, Make, Zapier or your AI agent.

β¬οΈ Input
Only mode and spreadsheetId are required. Export also needs serviceAccountJson and either datasetId or rows; import reads link-shared sheets without a key.
Setup in 3 minutes
Google Cloud console > IAM > Service accounts > Create (no roles needed); Keys > Add key > JSON and paste the file into serviceAccountJson; APIs > Library > Google Sheets API > Enable; then share the sheet with the client_email inside as Editor (export) or Viewer (import).
Write modes
append adds below the last row, replace clears the target first, upsert matches rows by keyColumn. sheetName picks the tab (default Sheet1, created if missing unless createSheet is off).
Ranges
Import takes any A1 range such as A1:F500 or 'My tab'!A:D; empty selects the whole first tab. maxRows caps the rows (0 for all).
| Field | Type | What it does | Default |
|---|---|---|---|
Mode (mode) | string | Export writes rows into the sheet; import reads a range into this run's dataset. | "export" |
Spreadsheet URL or id (spreadsheetId) | string | The sheet's URL from the browser (https://docs.google.com/spreadsheets/d//edit) or just the id. | "https://docs.google.com/spreadsheets/d/ |
Tab name (sheetName) | string | The tab to write to or read from. | |
Service-account key (JSON) (serviceAccountJson) | string | The JSON key of a Google Cloud service account; share the sheet with its client_email (Editor for export, Viewer for import). | |
Dataset id (export) (datasetId) | string | The Apify dataset to export, e.g. | |
Rows (export) (rows) | array | Instead of a dataset: a JSON array of objects. | |
Write mode (export) (writeMode) | string | New columns are always added to the right of the header row. | "append" |
Key column (upsert) (keyColumn) | string | Column whose value identifies a row, e.g. | |
Create the tab if missing (export) (createSheet) | boolean | Otherwise a missing tab stops the run with the list of tabs. | true |
Range (import) (range) | string | A1 range such as A1:F500 or 'My tab'!A:D. | |
First row is a header (import) (headerRow) | boolean | Use the first row as field names; otherwise fields are column letters (A, B, ...). | true |
Rows per write call (chunkSize) | integer | Large exports are written in chunks of this many rows. | 1000 |
Maximum rows (maxRows) | integer | Maximum number of rows to read from the sheet in import mode; 0 reads every row. | 0 |
Dry run (export) (dryRun) | boolean | Plan the export and show a preview in OUTPUT without writing or charging rows. | false |
Maximum retries (maxRetries) | integer | Retries per call on Google quota (429) and server errors, with exponential backoff. | 5 |

Input example
{"mode": "import","spreadsheetId": "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit","range": "'Class Data'!A1:F"}
β¬οΈ Output
Import gives one dataset item per sheet row, keyed by the header. Export fills your tab; its run summary shows what happened.

Output example
One row from an import of Google's public sample sheet ('Class Data'!A1:F):
{"Student Name": "Alexandra","Gender": "Female","Class Level": "4. Senior","Home State": "CA","Major": "English","Extracurricular Activity": "Drama Club"}
Export run summary
After an export the key-value store record OUTPUT holds the counts and the sheet link (example numbers):
{"rowsIn": 120,"planRows": 120,"rowsWritten": 120,"appended": 95,"updated": 25,"skipped": 0,"columns": 8,"writeCalls": 2,"dryRun": false,"sheetUrl": "https://docs.google.com/spreadsheets/d/<id>/edit"}
View the results as a table or JSON in the Output tab and download them as JSON, CSV, Excel, XML, HTML or RSS, all fields or only those you pick.
π° How much does Google Sheets Import and Export cost?
Google Sheets Import and Export is priced per event: 5 USD per 1,000 rows (0.005 USD per row), with no monthly rental. Plus 0.005 USD once per run. Dry runs charge only the run.
| You get | You pay |
|---|---|
| 100 rows | 0.5 USD |
| 1,000 rows | 5 USD |
| 10,000 rows | 50 USD |
| 100,000 rows | 500 USD |
Optional extras are charged only when you switch them on:
- Row: 0.2 USD per 1,000
π‘ Apify's free plan gives you 5 USD of credit every month, enough for about 1,000 rows at no cost. Set a spending limit per run and the Actor stops there.
βοΈ Google Sheets Import and Export vs. the alternatives
| Google Sheets Import and Export | Copy and paste | Other Sheets Actors | |
|---|---|---|---|
| Upsert by key (update, no duplicates) | β | β | varies |
| New columns added to the header | β | by hand | varies |
| Dry run with preview | β | β | rare |
| Retries on Google's quota | β | β | varies |
| Your own service account, no OAuth pop-up | β | n/a | often OAuth |
π Integrations, API and MCP
Connect Google Sheets Import and Export to your AI agent (MCP)
Give Claude, ChatGPT, Cursor or any MCP client direct access to Google Sheets Import and Export through the Apify MCP server. Add this URL to its settings:
https://mcp.apify.com/?actors=bepolabs/google-sheets
For Claude Desktop, add it under mcpServers in claude_desktop_config.json:
{"mcpServers": {"google-sheets": {"command": "npx","args": ["-y","@apify/actors-mcp-server","--actors","bepolabs/google-sheets"],"env": {"APIFY_TOKEN": "<your Apify API token>"}}}}
Then ask: "Read the sheet https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms and tell me how many students major in English."
Run it from your code
Python (pip install apify-client):
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("bepolabs/google-sheets").call(run_input={"mode":"import","spreadsheetId":"https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit","range":"'Class Data'!A1:F"})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
JavaScript (npm install apify-client):
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('bepolabs/google-sheets').call({"mode":"import","spreadsheetId":"https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit","range":"'Class Data'!A1:F"});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
No-code integrations
Send results to Google Sheets, Slack, Airtable, HubSpot, Make, Zapier, n8n and more from the Integrations tab, start runs on a schedule, or trigger your own endpoint with a webhook when a run finishes. The Apify API gives you full control over runs and datasets.
β FAQ
Do I need a Google Cloud account?
For export, yes: a free service account key (see the input tips, about 3 minutes). Import of a sheet shared as "Anyone with the link" needs none at all.
Will an export overwrite my data?
Only with writeMode: replace. append adds below the last row and upsert only changes rows whose key matches; run with dryRun first to see the plan.
How large can an export be?
Rows are written in chunks (chunkSize, default 1000) within Google's limit of 10 million cells per spreadsheet.
Can I run it after every scraper run?
Yes: add it as an integration or webhook on the task of your scraper, or schedule it; set datasetId to that dataset.
My spreadsheet ID is not 44 characters long. Does it work?
Yes. Paste the sheet's URL from the browser or just the id; any length from 20 characters is accepted, older 33-character ids too.
Is it legal to use Google Sheets Import and Export?
The Actor reads and writes only sheets that you share with your own service account, or that are already public by link, through Google's official API. You stay responsible for the data you move and for Google's terms.
What if something is missing or does not work?
Open an issue on the Issues tab; we read each one and reply. Feature requests are welcome too.
π¬ Your feedback
Tell us what Google Sheets Import and Export should add on the Issues tab or leave a review; your notes decide what we work on next.
π Related Actors
| Actor | What it does |
|---|---|
| π Phone Number Validator | Bulk phone number validation offline: valid or not, E.164 format, country and line type (mobile, fixed line, VoIP) for every number. |
| πΌ ATS Jobs | Every open job from company career boards on Greenhouse, Lever, Ashby, Workable, SmartRecruiters and Recruitee in one deduped feed. |
| π Remote Jobs | Remote jobs from Remote OK, Himalayas, Jobicy and Arbeitnow in one deduped feed, with salary, posted date and apply link. |
| π Website Contacts | Company websites to emails, phone numbers and social profiles, one row per site, with a status that says why nothing was found. |
| ποΈ SAM.gov Contract Opportunities | US federal contract opportunities by keyword, NAICS, set-aside or agency, with deadlines, contacts and attachments. |
| π¬π§ UK Tenders | UK public contracts from Contracts Finder and Find a Tender by keyword, CPV, value, region and deadline, with daily alerts. |
| β App Store Reviews | iOS App Store reviews with stars, text, app version and date, plus the app's rating and details, for any store country. |
| π§© Chrome Web Store Scraper | Users, rating, version, last update, developer, category and permissions of any Chrome extension. |