Public Google Sheet scraper
Pricing
Pay per usage
Pricing
Pay per usage
Rating
0.0
(0)
Developer

Fabian Maume
Actor stats
0
Bookmarked
4
Total users
3
Monthly active users
11 hours ago
Last modified
Categories
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 dependancyfrom apify import Actorfrom crawlee.storages import Dataset# call sub-actoractor_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 itemsdataset_client = run_client.dataset()items = await dataset_client.list_items()Actor.log.info('google data imported')Actor.log.info(items.count)#Get iterable arrayresult = 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 dependancyimport { ApifyClient } from 'apify-client';import { Actor } from 'apify';// launch actorlet 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"]