Google Trends Scraper

Google Trends API to scrape data from Google Trends. Extract data for multiple search terms listed in a Google Sheet, define time ranges to get results at a higher frequency, select categories, and specify geographical locations. Download your data as HTML, JSON, CSV, Excel, XML, and more.

Search terms

searchTerms

Optional

array

(Required if 'spreadsheetId' is not provided) List of search terms to be scraped.

Multiple terms

isMultiple

Optional

boolean

If checked comma will be handled as search for multiple terms

Time range

timeRange

Optional

Enum

Choose a predefined search's time range (defaults to 'Past 12 months')

Options:

"now 1-H": string"now 4-H": string"now 1-d": string"now 7-d": string"today 1-m": string"today 3-m": string"today 5-y": string"all": string

Geo area

geo

Optional

Enum

Get results from a specific geo area (defaults to 'Worldwide')

Options:

"AF": string"AL": string"DZ": string"AS": string"AD": string"AO": string"AI": string"AQ": string"AG": string"AR": string"AM": string"AW": string"AU": string"AT": string"AZ": string"BS": string"BH": string"BD": string"BB": string"BY": string"BE": string"BZ": string"BJ": string"BM": string"BT": string"BO": string"BQ": string"BA": string"BW": string"BV": string"BR": string"IO": string"BN": string"BG": string"BF": string"BI": string"CV": string"KH": string"CM": string"CA": string"KY": string"CF": string"TD": string"CL": string"CN": string"CX": string"Keeling Islands ": string"CO": string"KM": string"CG": string"CD": string"CK": string"CR": string"CI": string"HR": string"CU": string"CW": string"CY": string"CZ": string"DK": string"DJ": string"DM": string"DO": string"EC": string"EG": string"SV": string"GQ": string"ER": string"EE": string"ET": string"Malvinas ": string"FO": string"FJ": string"FI": string"FR": string"GF": string"PF": string"TF": string"GA": string"GM": string"GE": string"DE": string"GH": string"GI": string"GR": string"GL": string"GD": string"GP": string"GU": string"GT": string"GG": string"GN": string"GW": string"GY": string"HT": string"HM": string"Vatican City State ": string"HN": string"HK": string"HU": string"IS": string"IN": string"ID": string"IR": string"IQ": string"IE": string"IM": string"IL": string"IT": string"JM": string"JP": string"JE": string"JO": string"KZ": string"KE": string"KI": string"the Democratic People's Republic of ": string"the Republic of ": string"KW": string"KG": string"LA": string"LV": string"LB": string"LS": string"LR": string"LY": string"LI": string"LT": string"LU": string"MO": string"MK": string"MG": string"MW": string"MY": string"MV": string"ML": string"MT": string"MH": string"MQ": string"MR": string"MU": string"YT": string"MX": string"FM": string"MD": string"MC": string"MN": string"ME": string"MS": string"MA": string"MZ": string"MM": string"NA": string"NR": string"NP": string"NL": string"NC": string"NZ": string"NI": string"NE": string"NG": string"NU": string"NF": string"MP": string"NO": string"OM": string"PK": string"PW": string"PS": string"PA": string"PG": string"PY": string"PE": string"PH": string"PN": string"PL": string"PT": string"PR": string"QA": string"RE": string"RO": string"RU": string"RW": string"BL": string"SH": string"KN": string"LC": string"French part ": string"PM": string"VC": string"WS": string"SM": string"ST": string"SA": string"SN": string"RS": string"SC": string"SL": string"SG": string"Dutch part ": string"SK": string"SI": string"SB": string"SO": string"ZA": string"GS": string"SS": string"ES": string"LK": string"SD": string"SR": string"SJ": string"SZ": string"SE": string"CH": string"SY": string"TW": string"TJ": string"TZ": string"TH": string"TL": string"TG": string"TK": string"TO": string"TT": string"TN": string"TR": string"TM": string"TC": string"TV": string"UG": string"UA": string"AE": string"GB": string"US": string"UM": string"UY": string"UZ": string"VU": string"VE": string"VN": string"VG": string"VI": string"WF": string"EH": string"YE": string"ZM": string"ZW": string

Google sheet ID (To get input data from Google sheet)

spreadsheetId

Optional

string

(Optional) Id of the google sheet from where search terms will be loaded. Spreadsheet must have only one column. Row 1 is considered the title of the column so it will not be loaded as a search term. Check the actor documentation for more info.

Is the Google sheet public

isPublic

Optional

boolean

If checked you can import a public spreadsheet without need for authorization. For importing private sheets, please read about authorization in the actor documentation.

Category of trends

category

Optional

Enum

Choose a category to filter the search for (defaults to 'All categories')

Options:

"3": string"47": string"44": string"22": string"12": string"5": string"7": string"71": string"8": string"45": string"65": string"11": string"13": string"958": string"19": string"16": string"299": string"14": string"66": string"29": string"533": string"174": string"18": string"20": string"67": string

Max items

maxItems

Optional

integer

Limit of product items to be scraped. Zero value means no limit.

Custom time range

customTimeRange

Optional

string

Provide custom time range. If present, it takes precedence over regular timeRange. Format is: YYYY-MM-DD YYYY-MM-DD. See examples in the documentation.

Extend output function

extendOutputFunction

Optional

string

A function which result will get merged with the default result. It must return an object.

Proxy configuration

proxyConfiguration

Required

object

The best option is usually Automatic proxy, but you can also use your own proxies or no proxy. It defaults to useApifyProxy. Country defaults to 'US'.

Output as ISO Date

outputAsISODate

Optional

boolean

Outputs date column as an ISO date time string

CSV firendly output

csvOutput

Optional

boolean

Output columns will be as follows: date, keyword(s)...

Max concurrency

maxConcurrency

Optional

integer

How many pages will be opened in parallel if enough CPU is available.

Page load timeout

pageLoadTimeoutSecs

Optional

integer

How long it will wait for page loading before it abandons the loading and tries again.