1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "geo": "US",
10 "outputMode": "complete",
11 "fromDate": "today",
12 "toDate": "3 days",
13 "maxItems": 100,
14 "proxy": { "useApifyProxy": True },
15 "extendOutputFunction": """async ({ data, item, request, customData, fromDate, toDate, Apify }) => {
16 return item;
17}""",
18 "extendScraperFunction": """async ({ data, item, request, addUrl, customData, fromDate, toDate, extendOutputFunction, Apify }) => {
19
20}""",
21 "customData": {},
22}
23
24
25run = client.actor("dainty_screw/advanced-google-trending-searches").call(run_input=run_input)
26
27
28print("πΎ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
29for item in client.dataset(run["defaultDatasetId"]).iterate_items():
30 print(item)
31
32