1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentItems": [
10 {
11 "id": "s1",
12 "query": "best crm software",
13 "position": 1,
14 "title": "Best CRM Software",
15 "url": "https://competitor.example/crm",
16 "snippet": "Compare CRM platforms",
17 },
18 {
19 "id": "s2",
20 "query": "best crm software",
21 "position": 4,
22 "title": "Our CRM Guide",
23 "url": "https://ourbrand.example/crm-guide",
24 "snippet": "CRM buyer guide",
25 },
26 ],
27 "previousItems": [{
28 "id": "s2",
29 "query": "best crm software",
30 "position": 7,
31 "title": "Our CRM Guide",
32 "url": "https://ourbrand.example/crm-guide",
33 "snippet": "CRM buyer guide",
34 }],
35}
36
37
38run = client.actor("quanmatrix/google-serp-competitive-share-intelligence").call(run_input=run_input)
39
40
41print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
42for item in client.dataset(run.default_dataset_id).iterate_items():
43 print(item)
44
45