1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "targets": [
10 {
11 "query": "how to use air fryer",
12 "externalId": "air-fryer-how",
13 "country": "us",
14 "language": "en",
15 "vertical": "web",
16 },
17 {
18 "query": "can air fryer",
19 "externalId": "air-fryer-can",
20 "country": "us",
21 "language": "en",
22 "vertical": "web",
23 },
24 {
25 "query": "why air fryer",
26 "externalId": "air-fryer-why",
27 "country": "us",
28 "language": "en",
29 "vertical": "web",
30 },
31 ],
32 "monitorKey": "air-fryer-content-watch",
33 "mode": "changesOnly",
34}
35
36
37run = client.actor("automa-flow/google-autocomplete-rank-change-monitor").call(run_input=run_input)
38
39
40print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
41for item in client.dataset(run.default_dataset_id).iterate_items():
42 print(item)
43
44