1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "keywords": [
10 "coffee",
11 "tea",
12 ],
13 "dataTypes": ["interestOverTime"],
14 "anchorKeyword": "",
15 "customTimeRange": "2025-01-01 2025-06-30",
16 "category": 0,
17 "trendingGeo": "US",
18 "trendingMaxItems": 100,
19 "language": "en-US",
20 "timezoneOffsetMinutes": 0,
21 "maxConcurrency": 2,
22}
23
24
25run = client.actor("khalilbenali/google-trends-scraper").call(run_input=run_input)
26
27
28print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
29for item in client.dataset(run.default_dataset_id).iterate_items():
30 print(item)
31
32