Google Sheets Import – Private Sheets to Dataset, No OAuth
Pricing
from $0.50 / 1,000 imported rows
Google Sheets Import – Private Sheets to Dataset, No OAuth
Read any Google Sheets tab or range – including private sheets – into an Apify dataset. Read-only service account, no browser login, real row numbers, typed values. Works from AI agents (MCP).
Pricing
from $0.50 / 1,000 imported rows
Rating
0.0
(0)
Developer
Moriarty Data Tools
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
21 hours ago
Last modified
Categories
Features
Share
Read any Google Sheets tab or range – including private sheets – into an Apify dataset, ready to feed scrapers, AI agents, Make/Zapier/n8n or your own code.
- Private sheets – no need to make your sheet public ("Anyone with the link"). Share it with your service account only.
- No "App blocked by Google" – your own service account. No OAuth screen, no browser login, nothing expires.
- Read-only – the Actor asks Google only for read access; sharing as Viewer is enough.
- Works from AI agents (MCP) – Claude, ChatGPT, Cursor or any MCP client can call it.
- Any tab, any range – first tab by default, or a tab by name and a range like
B3:F500. - Clean field names – empty headers become the column letter, duplicates get
_2,_3. - Real row numbers – each item has
_row, its row number in the sheet, so you can write results back. - Typed values – numbers stay numbers, booleans stay booleans, dates come as readable text.
- Big sheets – read in blocks of 5,000 rows;
maxRowsstops early. - Pay only for rows imported – $0.50 per 1,000 rows; preview rows are free.
Jump to: Try it · Setup · Example · Price · Input · AI agents · FAQ
Try it first: preview mode
Click Start with no spreadsheet or key to see sample output in the exact format. With a real sheet, tick Preview only to read just the first 20 rows (not charged).
Quick start (3 minutes, once)
- Google Cloud Console → create (or pick) a project.
- APIs & Services → Library → Google Sheets API → Enable.
- IAM & Admin → Service Accounts → Create service account (no roles needed).
- Open it → Keys → Add key → Create new key → JSON. A file downloads.
- Open your spreadsheet → Share → paste the service account email → Viewer.
- In this Actor, paste the JSON file content into Google service account key and the sheet URL into Spreadsheet URL or ID.
Already using Google Sheets Export? Use the same key.
Example: a sheet of URLs feeds a scraper
Your team keeps a private sheet, tab Targets:
| A | B | C | |
|---|---|---|---|
| 1 | URL | Priority | Notes |
| 2 | https://shop-a.example | high | |
| 3 | https://shop-b.example | low | check weekly |
| 4 | |||
| 5 | https://shop-c.example | high |
Input:
{"spreadsheet": "https://docs.google.com/spreadsheets/d/1AbC.../edit","serviceAccountJson": "{ \"type\": \"service_account\", ... }","sheetName": "Targets"}
Output (3 rows – the empty row 4 is skipped, row numbers stay real):
[{ "_row": 2, "URL": "https://shop-a.example", "Priority": "high", "Notes": "" },{ "_row": 3, "URL": "https://shop-b.example", "Priority": "low", "Notes": "check weekly" },{ "_row": 5, "URL": "https://shop-c.example", "Priority": "high", "Notes": "" }]
Feed the dataset to any scraper, then send the results back with Google Sheets Export – sheet → scraper → sheet.
How much does it cost?
| What | Price |
|---|---|
| Each row imported | $0.50 per 1,000 rows ($0.0005 per row) |
| Each run start | $0.0005 |
| Platform usage | Included – no compute bill on top |
- A 2,000-row sheet: 2,000 × $0.0005 + $0.0005 ≈ $1.00.
- Preview runs (first 20 rows) and failed runs: no row charges.
- Set Maximum cost per run in the run options: the Actor stops cleanly at that limit.
Input
| Field | What it does |
|---|---|
spreadsheet | Sheet URL or ID |
serviceAccountJson | Your service account JSON key (secret) |
sheetName | Tab to read (empty = first tab) |
range | Optional block, e.g. A1:F500 (no tab name) |
headerRow | First row = field names (default on) |
valueRender | Raw values (default), as shown in the sheet, or formulas |
skipEmptyRows | Ignore blank rows (default on) |
includeRowNumber | Add _row (default on) |
maxRows | Stop after N rows |
dryRun | Preview the first 20 rows, not charged |
Output
One dataset item per row, plus an OUTPUT record with rowsImported, columns, sheetName
and the spreadsheet link.
Use it from an AI agent (MCP)
{ "mcpServers": { "apify": { "url": "https://mcp.apify.com?tools=moriarty_ag/google-sheets-import" } } }
An agent can read a team's private sheet (a list of products, keywords, leads to check) and work
on it, with no browser login: {"spreadsheet": "...", "serviceAccountJson": "...", "sheetName": "Keywords"}.
FAQ
How do I import a private Google Sheet into Apify? Share the sheet with your service account email as Viewer (setup above). The sheet stays private: no public link needed.
How do I read only part of a sheet?
Put a range in range, e.g. B3:F500. The first row of the range is the header.
My table starts below a title. What do I do?
Use range starting at the header row, e.g. A4:H.
Why are some columns called B or C? Their header cell is empty. Name them in the sheet, or rename them in your next step.
How do I get dates and currency exactly as I see them?
Set Values to As shown in the sheet (FORMATTED_VALUE). The default gives raw numbers
(better for calculations) and dates as text.
Can I read formulas? Yes: Values → Formulas.
Is my key safe? It's a secret input: stored encrypted, never logged, only sent to Google, and it only works on sheets you shared with its email. The Actor only requests read access.
Common errors (and the fix the Actor tells you)
| Message | Fix |
|---|---|
| No access to the spreadsheet | Share the sheet with the service account email as Viewer |
| Google Sheets API is not enabled | Enable it in APIs & Services → Library |
| Tab 'X' does not exist | The message lists the available tabs |
| Not a service-account key | Download a JSON key of a service account, not an OAuth client |
Found a bug? Open an issue on the Issues tab with the input you used (without your key).