1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searchTerms": [
10 "ChatGPT",
11 "Claude AI",
12 "Gemini AI",
13 ],
14 "geo": "US",
15 "timeRange": "today 12-m",
16 "category": 0,
17 "property": "web",
18 "hl": "en-US",
19 "interestByRegion": True,
20 "relatedQueries": True,
21 "relatedTopics": True,
22 "trendingNow": True,
23 "trendingGeo": "US",
24}
25
26
27run = client.actor("bibian/google-trends-scraper").call(run_input=run_input)
28
29
30print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
31for item in client.dataset(run.default_dataset_id).iterate_items():
32 print(item)
33
34