Public Google Sheet scraper avatar
Public Google Sheet scraper

Pricing

Pay per usage

Go to Apify Store
Public Google Sheet scraper

Public Google Sheet scraper

Download data from a publicly available Google Sheet.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Fabian Maume

Fabian Maume

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

3

Monthly active users

11 hours ago

Last modified

Share

Public Google Sheet scraper

Easily import a Google spreadsheet to Apify and copy the data to an Apify’s Dataset.

How to use

Make sure that the Google Sheet you want to scrape is available to anybody with the link.

Provide the url as input to this actor.

You will get a Dataset with one record per line in your input Sheet.

Note: If you are working with a sheet that you are the owner of it is better to use the Google API to retrieve information. That will enable you to get data from non-public sheets. This actor will help you work with private files.

Call this actor from another actor

You can use this actor as part of your actor. This actor is perfect to collect user inputs from a Google Sheet, which easyer to use than Json for non technical users.

Read a Google Sheet with a python actor

The sample code bellow will allow you get the data from the google spreadsheet using Apify python SDK. You need to provide the spreadsheet URL to the "url" variable (as a string). The "result" variable will be an array of dictionaries, where each item is a line of the Google spreadsheet and dictionary keys are the spreadsheet header.

#import dependancy
from apify import Actor
from crawlee.storages import Dataset
# call sub-actor
actor_run = await Actor.call(
actor_id='advantageous_subcontra/public-google-sheet-scraper',
run_input={'googleSheetUrl': url},
)
# Wait for the Actor run to finish.
run_client = Actor.apify_client.run(actor_run.id)
await run_client.wait_for_finish()
ctor.log.info("Got googlesheet input")
# Get the task run dataset items
dataset_client = run_client.dataset()
items = await dataset_client.list_items()
Actor.log.info('google data imported')
Actor.log.info(items.count)
#Get iterable array
result = items.items

Read a Google Sheet with a JavaScript actor

The sample code bellow will allow you get the data from the google spreadsheet using Apify javascript SDK. You need to provide the spreadsheet url to the "url" variable (as a string). The "result" variable will be an array of object, where each item is a line of the google spreadsheet and object keys are the spreadsheet header

//import dependancy
import { ApifyClient } from 'apify-client';
import { Actor } from 'apify';
// launch actor
let run = await Actor.call('advantageous_subcontra/public-google-sheet-scraper', {
'googleSheetUrl': url
})
// Fetch and print Actor results from the run's dataset (if any)
const inputList = await client.dataset(run.defaultDatasetId).listItems();
result = inputList["items"]