1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searchTerms": [
10 "chatgpt",
11 "coffee, tea",
12 ],
13 "modes": [
14 "interestOverTime",
15 "relatedQueries",
16 ],
17 "geo": "US",
18 "trendingCountries": ["US"],
19 "maxTrendsPerCountry": 20,
20 "proxyConfiguration": {
21 "useApifyProxy": True,
22 "apifyProxyGroups": ["RESIDENTIAL"],
23 },
24}
25
26
27run = client.actor("wakeful_outhouse/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