1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "keywords": [
10 "python",
11 "java",
12 "rust",
13 "golang",
14 "kotlin",
15 "swift",
16 "typescript",
17 ],
18 "geos": ["US"],
19 "timeRange": "today 12-m",
20 "customTimeRange": "",
21 "searchType": "web",
22 "category": 0,
23 "dataTypes": ["keywordSummary"],
24 "regionResolution": "auto",
25 "maxRegionsPerKeyword": 25,
26 "relatedQueryKind": "both",
27 "maxRelatedPerKeyword": 25,
28 "maxItems": 200,
29 "proxyConfiguration": { "useApifyProxy": True },
30}
31
32
33run = client.actor("datagrit/google-trends-keyword-ranker").call(run_input=run_input)
34
35
36print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
37for item in client.dataset(run.default_dataset_id).iterate_items():
38 print(item)
39
40