Google Sheets Import and Export avatar

Google Sheets Import and Export

Pricing

from $8.50 / 1,000 rows written, per block of up to 100s

Go to Apify Store
Google Sheets Import and Export

Google Sheets Import and Export

Read a Google Sheet into an Apify dataset, or write an Apify dataset or a list of rows into a Google Sheet: append, replace, or update rows by a key column. Works on your own Google service account or OAuth token; a sheet shared as anyone with the link reads with no credential.

Pricing

from $8.50 / 1,000 rows written, per block of up to 100s

Rating

0.0

(0)

Developer

Mamba Labs

Mamba Labs

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 minutes ago

Last modified

Features

Limited permissions

Share

Read a Google Sheet into an Apify dataset, or write an Apify dataset or a list of rows into a Google Sheet. Read mode returns one row per sheet row, keyed by the header row. Append, replace, and upsert modes write rows into a tab, add new columns to the header as they appear, and in upsert mode overwrite the rows whose key column value is already in the sheet. Writes run on your own Google credential: a service account key or an OAuth token. A sheet shared as "anyone with the link" reads with no credential. You pay per block of up to 100 rows.

Features

  • Read any tab into JSON rows keyed by its header row, with the sheet row number on each row. Pick the tab by name, by gid, or by the gid in the URL, and limit the read to an A1 range.
  • Export an Apify dataset to a sheet: pass the dataset ID, or {{resource.defaultDatasetId}} from an Apify integration, and every item becomes a sheet row.
  • Append, replace, or upsert. Append adds rows after the last row. Replace clears the tab, then writes. Upsert overwrites the rows whose key_column value already exists and adds the rest.
  • Header matching. Your row keys are matched to the sheet's header columns, whatever their order. A key the header does not have becomes a new column at the end.
  • Safe values. Values are stored as plain text by default, so a scraped value that starts with = is not run as a formula. Set value_input to user_entered to have Google parse formulas, dates, and numbers.
  • Never bills a write it could not deliver. Before each write the actor checks your charge limits, and it never writes a block of rows it could not charge.

How the data is read

The actor calls the Google Sheets API v4 (sheets.googleapis.com) with your own credential. A service account key is exchanged for a one hour access token at oauth2.googleapis.com; a refresh token is exchanged the same way with its OAuth client. Your credential is sent only to Google and is never stored, logged, or written to a row. With no credential, read mode fetches Google's own CSV export of a sheet shared as "anyone with the link". No proxy, no browser, and no other developer's actor. Your use of the Sheets API runs on your own Google project under Google's API terms.

Setting up a service account. In Google Cloud, create a service account, enable the Google Sheets API on its project, create a JSON key, and paste the whole file into service_account_json. Then share the spreadsheet with the service account's client_email as an Editor (a Viewer is enough to read).

Testing. Read mode on a public sheet was tested live on 2026-11-17. The write modes and the credential routes were tested against recorded Google responses and a refused key path from inside an Apify run. The first buyer's credential is the live test of the write path.

Input

FieldTypeDefaultWhat it does
modestringreadread (default): the sheet becomes one dataset row per sheet row. append: add rows after the last row. replace: clear the tab, then write the rows. upsert: overwrite the rows whose key_column value is already in the sheet and add the rest. The three write modes need a credential below.
spreadsheetstringThe Google Sheets URL as copied from the browser, or the spreadsheet ID. A #gid= in the URL picks that tab.
sheetstringOptional. The tab name, or its gid number. Default: the gid in the URL, else the first tab. In a write mode a tab name that does not exist is created.
rangestringOptional, read mode. An A1 range without the tab name, for example A1:F500 or B:D. Default: the whole tab.
header_rowstringtruetrue (default) or false. When true, read rows are keyed by the header row, and writes match your row keys to the header columns and add new columns at the end. When false, read rows are keyed by column letter and writes go column by column in key order.
dataset_idstringWrite modes. The Apify dataset whose items go into the sheet, for example the default dataset of another run. In an Apify integration, pass the triggering run's resource.defaultDatasetId variable. Fields starting with # are skipped.
rowsarrayWrite modes, instead of a dataset. A JSON list of objects, one per sheet row, for example [{"name": "Ann", "email": "ann@example.com"}].
columnsarrayOptional, write modes. Only these keys are written, in this order. Default: every key in the rows, in first seen order.
key_columnstringUpsert mode. The column whose value identifies a row, for example email or url. A row whose value is already in that column is overwritten in place; the rest are added. Rows with no value in it are skipped.
value_inputstringrawraw (default): every value is stored exactly as given, so text starting with = is not run as a formula. user_entered: Google parses values as if typed, so formulas run and dates and numbers are converted.
max_rowsstring100000Most rows to read or write in this run, 1 to 1,000,000 (default 100,000).
service_account_jsonstringYour own service account key file, pasted whole. Share the spreadsheet with its client_email as an Editor (Viewer to read). It is sent only to Google and is never stored, logged, or written to a row.
oauth_refresh_tokenstringInstead of a service account: a refresh token from your own Google OAuth client with the spreadsheets scope. Needs oauth_client_id and oauth_client_secret from the same client.
oauth_client_idstringThe client ID that issued the refresh token.
oauth_client_secretstringThe client secret that issued the refresh token.
oauth_access_tokenstringInstead of the above: a current OAuth access token with the spreadsheets scope. It expires in about an hour, so it suits a single run.
max_charge_usdstringOptional. The run stops before a charge that would pass this amount, and never writes a block of rows it could not charge. Summary rows are always returned.

Output

FieldTypeWhat it holds
row_typestringOne of: sheet_row, read_receipt, write_receipt, run_summary. run_summary is the one free row written when the input is refused.
spreadsheet_idstringThe ID of the spreadsheet, from its URL.
sheetstringThe tab the run read or wrote, by name. A public read by gid shows the gid.
modestringread, append, replace, or upsert, as run.
accessstringHow the actor reached the sheet: public_link (no credential, a sheet shared as anyone with the link), service_account, refresh_token, or access_token.
row_numberintegerOn a sheet_row: the row number in the sheet, from 1.
valuesobjectOn a sheet_row: the row as column name to cell text, using the header row. With header_row off, the keys are column letters.
cellsarrayOn a sheet_row: the row's cells in column order, as text.
rows_in_blockintegerOn a receipt: how many rows this billed block covers, 1 to 100.
rangestringOn a receipt: the sheet range read or written, as Google reported it.
rows_readintegerOn the summary row: sheet rows delivered in this run.
rows_writtenintegerOn the summary row: rows written to the sheet in this run, updated plus appended.
rows_updatedintegerOn the summary row in upsert mode: existing rows overwritten in place.
rows_appendedintegerOn the summary row: rows added as new sheet rows.
row_statusstringok, or why this row carries no data: no_results, no_change, partial, blocked, or error.
error_reasonstringWhy the row is not ok. A refused input reads input_invalid: followed by what to fix.
billable_events_jsonstringWhat this row was billed as, for example {"rows-written":1}. {} means free.
scraped_atstringWhen the row was written, UTC.

Row types: sheet_row (one per sheet row in read mode, free), read_receipt (one per block of up to 100 rows read, billed), write_receipt (one per block of up to 100 rows written, billed), and run_summary (one per run, free). To work with only the sheet data, filter the dataset to row_type sheet_row.

Pricing

Pay per event. Mamba Labs pays the platform costs of the run. Summary rows, empty reads and writes, a refused credential, and a refused input are free.

EventFree planBronzeSilverGold
rows-written, one block of up to 100 rows written to your sheet$0.01$0.0095$0.009$0.0085
rows-read, one block of up to 100 sheet rows read into the dataset$0.005$0.00475$0.0045$0.00425
apify-actor-start, once per run (one per GB of memory; the default 256 MB is one)$0.002$0.002$0.002$0.002

Per 1,000 rows of rows-written (10 blocks of 100): $0.10 on the free plan, $0.09 on Gold.

Free plan cap: 1.50 USD of evaluation a month, about 15000 rows. Any paid Apify plan removes the cap, and it resets on the 1st. The run stops before a charge that passes your maximum charge per run in Apify or your max_charge_usd input.

Mamba Labs pays the platform costs of your run, Apify proxy traffic included.

A write of 250 rows is 3 blocks. A read of 1,000 rows is 10 blocks.

Usage examples

Export a dataset after every run. Add this actor as an integration on another actor, with mode append, your spreadsheet URL, dataset_id {{resource.defaultDatasetId}}, and your service account key.

Keep a sheet in sync. Run with mode upsert and key_column url (or email, or any column that identifies a row). Rows already in the sheet are updated in place; new ones are added.

Clay. Number and on or off inputs are text fields, which is what Clay sends. A list input takes a JSON list, so put the column inside a one item list. rows also takes JSON text.

MCP. The Mamba Labs MCP server @mambalabsdev/mcp-google-sheets-import-export exposes this actor to Claude and other MCP clients.

Error handling

CaseWhat you get
Missing or unreadable inputOne free row, row_type run_summary, error_reason starting input_invalid: with what to fix. The run ends successfully and charges nothing but the run start (apify-actor-start)
Google refuses the credentialOne free run_summary row with row_status blocked and error_reason starting key_refused: with Google's reason. Nothing is written
The credential has no access to the sheetOne free blocked row starting no_access:. For a service account it names the email to share the sheet with
A private sheet with no credentialOne free blocked row that says to share it as "anyone with the link" or give a credential
No spreadsheet or tab with that ID or nameOne free no_results row starting not_found:. In a write mode, a tab name that does not exist is created instead
The Sheets API rate limitThe actor waits and retries up to 4 times, then stops with a free blocked row. Rows already written stay written and billed
Your charge limit is reachedThe run stops before the next block, writes nothing it could not charge, and the summary row says from which position rows were not written
The run is close to its timeoutThe actor stops starting new work 90 seconds before the timeout and delivers what it has

Limitations

  • Read mode returns the cell text as shown in the sheet (formatted values), not the formulas.
  • A public read by tab name uses Google's gviz export. It can return empty cells in a column that mixes numbers and text, it leaves out rows hidden by a filter left on the tab, and a tab name that does not exist returns the first tab instead of an error. Read by gid (the number after #gid= in the URL) to avoid all three; that uses the CSV export. Reads with a credential use the Sheets API and do not have these limits.
  • Upsert matches on exact text after trimming spaces. Rows with no value in key_column are skipped and counted on the summary row. Inside one write, the last row with a given key wins.
  • Objects and lists in your rows are written as JSON text. A cell holds at most 50,000 characters; longer values are cut, and the summary row counts them.
  • Replace clears the whole tab, formatting kept, values removed.
  • The Google Sheets API allows 60 write requests a minute per user by default. The actor writes up to 500 rows per request and waits when Google asks it to.
  • An OAuth access token expires in about an hour. For runs longer than that, use a service account key or a refresh token.

Mamba Labs actor suite

ActorActor ID
Account Hiring WatchgRAZA5WBi1r6L0gy7
Agent Accessibility AuditoranxbRv0lKrpQ1pnua
Agent to Brokerage ResolverePRRGLxOGyaVHO4dI
AI Answer Visibility TrackerRJZvzKniYK4nswcMg
AI List Extractor for Any WebsiteD5hOdIez45M0NX5jD
AI Tooling DetectorEwkHhmqiuJgRoVEbE
Amazon Product, Price, and Stock TrackerMtJPZoyjJ3IeqTFyo
Amazon Top Reviews Scraperwh6Mq6G6BlW1CRPwx
API Deprecation and Breaking Change MonitorpHsbS3xXUK8Jqutz5
App Store and Google Play Review MonitorMaCMEhGrbchxQZ92G
B2B Reddit Conversation MonitorSoDryzzsjmY3SsiyG
B2B Social Video TranscriptsdG2UYVKE2e4zfDucK
Bluesky Brand Presence MappereLpxzP4IuXznlFVND
Bluesky Posts ScraperKldSjS7wjoeZ7vQGm
Brand Sponsor FinderPPgK6xrgOmvL7Nrys
Brazil CNPJ Company DatacTVqsjG6A56xtLkBA
Bulk WHOIS and RDAP Domain Age LookupMTrkG5FLU6SjqLdJY
Business PDF Field ExtractorvM7JCk0CMAx5W0oJh
Career Change Signal EnginevX2Yga1a6wGaXaP14
Company Careers Page Jobs, 17 ATS BoardsizP0rfIgf5YaRZfIh
Company Change Event FeedoX44rS0fkEJ3rXLWe
Company Discovery List Builderjch0HdaZnpbMqlcGS
Company Firmographic EnricherYlUtLWjfPpqykmB8g
Company Funding RecordOFS4Mt1gyYNtGfUbE
Company Headcount EstimatoraHC4GROnNt6kfZe5r
Company Identity Resolverlr8fTRAmZCBZmuwwh
Company Role Email, Phone and Address Finder4mMncKaJykiq94grz
Company Social Presence Mapper4k6CCemkgBDz18m2h
Competitor Price, Stock, and Changelog MonitoryxdgCbUQ4PYQWwRNU
Contact Classifier0lGSeYJmniXhGANnO
Contractor License Search, CA, TX, WA, OR, LAWBYK3CPI2kdeq4bP1
CRM Contact Job Change CheckerL8UbEmMJC1XYPSZOb
Domain Deliverability Checker0tVgxI7A6o9jMlxmc
Domain to LinkedIn URL Resolver3HtnSaqPHOg1Qg5gx
Ecommerce Platform Profiler5G2NeYjBbQTjaTn9L
Ecommerce Store DiscoveryPeHu4sLyFvQHXUUrX
Email List Verifier, Bring Your Own KeyCzVJ4NlaCKk80xpgE
Event Presence IndexWLhMy8fMDgsxdYxv5
Eventbrite Events Scrapersgc6znyrbjOy5Yk9f
Expert Witness Finder, US and AustraliaLIpwlgfE3LaQBaXd4
Facebook Posts ScraperT6jxIeq4ua0SLXnqG
Facebook Reels ScraperAkOg4iNPHwYZD7Q5E
Funding and Press Signal ScannerFS13X6dhQVgX3XOM6
GDPR Cookie Banner and Consent CheckerTrKyOS0KBoGC35nbr
GitHub Followers and Following ExportSGNxDmFb9v3tRDaFI
GitHub Organization Signal ScannerahF8RRpv5mzPao5CN
Google Ads Transparency Center Scraper by Domain1eOwxhBVxzvOXAm4s
Google Flights FaresoVCatSfzcXbkFfcav
Google Hotels Pricesua9mDci66setpfd0B
Google Maps Places ScraperSuvHCNJ7pIuw6gn54
Google Sheets Import and Export0VT1IaI5S3lIllONL
Google Trends ScraperOeDzaACKmBYJXzHZk
GTM Hiring Signal ScraperD7O1SA2EqwHGsGr1P
GTM Signals AggregatorxKdRfnfFNkdMpFuNs
Healthcare Provider NPI EnricherMrgbHzcpDq3mOv9Df
Houzz Professionals Directorygv0DatXK2mOidqKLe
ICP Fit ScorerW161DT8W4kW55dMFh
Influencer Change Monitord2VVgahNL6UmcLkhg
Influencer Lead List BuilderKnmByszcv135yM30G
Influencer Profile ScraperEqEnklDVMIcB1V499
Influencer Search Across TikTok, Instagram and YouTubetpkedmloIIWtXx6sg
Influencer Talent Agency LookupzCuX4Mgyg6JvXgGzd
Instagram Facebook Brand Presence MapperHXh65I0JBjPsunbY8
Integration and Marketplace Presence MapperV0guNuvM85Q61f2gj
Job Board Keyword Signal Scanner4DvqpvhMR74NLcDDY
Job Posting Liveness CheckerqRI0ohsnkCwLeDKtw
Job Posting MonitorQCfICD9kOPiOdj5iI
Journalist and Media List BuildermAfizsZC8qRoR0ecS
Kick Channels, Streams, and ClipsREl7yEdagIx2YvoQU
Launch Directory List BuildercRq3bmvEZxZtioQ7U
Lead File Import CheckerRwlGVXTf46LqZdUgt
Legal Entity ResolverKHFyPCDIx7CyqULYm
Link in Bio Scraper and Newsletter DetectorOorucdheTIgu7RFzK
LinkedIn Company Page DetailsN9rfy1Cj2FRTOawvx
LinkedIn Company Page MapperzOPm6A9JEhUGcIdFW
LinkedIn Jobs FeedSH6N0d8cz46BhCC8B
LinkedIn Post TrackeroiGLNPuaf5BRaz9K5
Local Business Lead BuilderqMN97aoHhsAS5bznV
Local Rank and Map Pack Trackergv0kyHGDIg8XscclB
Lookalike Companies from Seed Domainse2O426WBAbLLQL4Z2
Manufacturer and Supplier FinderQcsdmd0lUfPzVkonh
MCP Server Change and Health MonitorIeqjWF9U0BdDQFY08
Media URL TranscriberSyfr7Ya3EsHgWfrB6
Medium Articles Scrapervw3X3RXnB353CXdxC
Meta Ad Library Ads by Company, Graph APIJ1GWlSXfSGU3u8Wng
Mobile Phone Waterfall6OOgPktf7RIa5XCOP
Multi Platform Social Posts and CommentsicFuHR1EzDvUcfCQ5
Netherlands Rental ListingssGKGsbwoX18lFb6dR
New Hire FindercKuc38p4nYHNF3IW8
Newly Registered Companies, UK, Norway, Finland, Franceg2WfZhWvCtc57g2Jo
News and Media Mention Monitorgol1PPUKrsIk4QLBd
News Site Article ArchiveNjcF3UD8791raFNHh
Newsletter Sponsor TrackerqSwpqxD1TiPZpLQHv
Open Tender and RFP FinderkPTGz6t6TFoUUyfaO
Outbound Stack Detectorv43UJC8r7qW7cBSTG
Page Finder and ExtractorTpurgcOZbVnknlaiC
Partner and Member Directory ExtractorZX0XJPPUvnFJxeC1a
People Finder & Email VerifierLEgloG7tWgQl4o6TD
Perplexity Answer ReaderFUbX5uEE2C2jOl2xC
Person LinkedIn URL ResolverssuyPV8LnEsL8qbnb
Person Social Footprint MapperjfQXa2zW9FHCJot9K
Personal Email to Company ResolverAefT5Ye6YNPFQwJBf
Pinterest Brand Presence Mapperd1HvjZfKhgvWsoEwn
Podcast Guest and Host Findero2MGSvgbSLeeXOsIo
Private Company Funding HistoryH02K3rQIVOYpnLYc3
Product Hunt Daily Launches with Maker DomainsO4VX63drWK9Y9x641
Property Owner Records0J7ovG1iaZpQD1P0T
Prospect Engineq9rT6v64nUJdPexOQ
Public Feature Board and Roadmap MonitorrcHF5gj5r2Vqnry35
Publishing Frequency TrackerTbLwaUUATdYb6wp4N
Recent Funding Rounds FeedKueVp9MOz7iOoAgDp
Reddit Brand Presence MapperpKQZmDaT70SEb54bZ
Reddit Search and Thread Scraper4Gsth5cP2Xt9V2xDN
Reporting Window FinderuINxR7a1IW8qUTRUX
Research Topic Institutions and AuthorsOH8ANqt7bCKbo72Gk
Semrush Domain Metrics3dqa0abJrpssHtrYL
Sequencer Event PollerS6s8Rjd61tGdrMRk4
Sequencer Lead Push0Jv27VeWM5tSZQs9x
Shopify App Store and Chrome Web Store ListingsgaY0BzkLyN77mD3wI
Site Crawler for Links and TableslLLJ6JxZ4XqN8ULz0
Sports Scores and FixturesyLoRnLcvqptp08cvX
Streaming Subscription Prices by CountrytbMroS2Zyn57bW17E
Substack Newsletter and Posts ScraperUEFsdwiPLmPNVy9xd
Team Page People Extractorj8a9zX0k4mNbvDbWK
Tech Stack Signal Detectorqyd7nNyqFPelQViBx
Tennis Match Datav3OX6zxXHZOf2yurO
Threads Posts by Keyword, Exact Match2OT8K8RiEEWtaj2MW
Threads Profile and PostsMbwVXjHdBt01kr2aF
Ticketmaster Event PricesCrvPX4IwLXQX9bls1
TikTok Brand Presence Mapperfco8FvoJcSafbeyd1
TikTok Video Statsuz9Q3cEycRgA6NfqA
Trustpilot Reputation Enricher3lIqfCt61j4hqE1xz
US and UK Contract Award Winners by CompanyzhEtllASykOcx9hJ8
US Import Records Buyer FinderVIMafpKF5ggOw0COU
VC and Accelerator Portfolio List BuilderchH8hrfuoqqolW06m
Website Accessibility Checker, WCAG 2.2 AAP3jBj3FRghKEhX52z
Website Phrase and Business Model ClassifierCBuZ9k7sRwBeiKiCS
Website Screenshot CapturenWd9M6qngY0sFiM8N
Website Traffic Rank EstimatorGnOFUzlNVIoXgeJjH
Work Email WaterfallOT6xqTFThC0Rjf7Zj
Workplace Program DetectorLi6pPDhqbdzFz3h7G
X Brand Presence MapperoLOgadhHUkNAyDA3w
YouTube Channel and Video List ScrapertxaAjeBqgj5MStFE4
YouTube Channel Email FinderIDgKZcmeeuunUbccN
YouTube Channel from Company Domain6hSpD3kd2s2IQ4VSs
YouTube Shorts ScraperjUTHnhThr8jaI5ZQS
Zillow Listing DetailsyG4zM0Enfsw2NefJ1

Built by Mamba Labs.