1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "prompts": [
10 "best answer engine optimization tools",
11 "best AI visibility tracker",
12 "how to optimize for Google AI Overviews",
13 ],
14 "brandName": "Semrush",
15 "domain": "semrush.com",
16 "competitors": [
17 "Ahrefs",
18 "Surfer SEO",
19 "Conductor",
20 ],
21 "country": "US",
22 "language": "en",
23 "maxPrompts": 3,
24 "timeoutSeconds": 20,
25 "proxyConfiguration": {
26 "useApifyProxy": True,
27 "apifyProxyGroups": ["RESIDENTIAL"],
28 },
29}
30
31
32run = client.actor("tugelbay/google-ai-overview-tracker").call(run_input=run_input)
33
34
35print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
36for item in client.dataset(run["defaultDatasetId"]).iterate_items():
37 print(item)
38
39