1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "keywords": [
10 "OpenAI",
11 "ChatGPT",
12 ],
13 "custom_timeframe": "2023-01-01 2023-12-31",
14 "common_geo": "US",
15}
16
17
18run = client.actor("scraperpro/google-trends-scraper").call(run_input=run_input)
19
20
21print("๐พ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
22for item in client.dataset(run["defaultDatasetId"]).iterate_items():
23 print(item)
24
25