1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "keywords": [
10 "coffee",
11 "iced coffee",
12 ],
13 "geo": "US",
14 "timeRange": "today 12-m",
15 "category": 0,
16 "property": "",
17 "includeTimeseries": True,
18 "includeRelatedQueries": False,
19 "includeRelatedTopics": False,
20 "includeGeoMap": False,
21 "maxRelatedItems": 25,
22 "tzOffset": 0,
23 "delaySeconds": 1.5,
24 "batchSize": 5,
25}
26
27
28run = client.actor("subimpact/google-trends-scraper-keyless").call(run_input=run_input)
29
30
31print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
32for item in client.dataset(run.default_dataset_id).iterate_items():
33 print(item)
34
35