1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "businessName": "Harborline Realty",
10 "website": "https://example.com/",
11 "city": "Kent",
12 "region": "WA",
13 "personAliases": ["Jane Doe"],
14 "answers": [
15 {
16 "promptText": "Which firm should I hire to sell a luxury home in Kent WA?",
17 "surface": "chatgpt",
18 "answer": "A few firms come up in national results. See https://example.com/ for a local overview.",
19 "citations": ["https://example.com/"],
20 "namedBusiness": False,
21 },
22 {
23 "promptText": "Which firm should I hire to sell a luxury home in Kent WA?",
24 "surface": "claude",
25 "answer": "Here is a directory of options: https://example.com/. Harborline Realty is not named here.",
26 "citations": ["https://example.com/"],
27 "namedBusiness": False,
28 },
29 {
30 "promptText": "Which firm should I hire to sell a luxury home in Kent WA?",
31 "surface": "perplexity",
32 "answer": "Buyers often compare several teams. https://example.com/ is cited.",
33 "citations": ["https://example.com/"],
34 "namedBusiness": False,
35 },
36 {
37 "promptText": "Who are the best real estate agents in Kent WA?",
38 "surface": "chatgpt",
39 "answer": "This national-level answer lists several names and cites https://example.com/.",
40 "citations": ["https://example.com/"],
41 "namedBusiness": False,
42 },
43 {
44 "promptText": "Who are the best real estate agents in Kent WA?",
45 "surface": "gemini",
46 "answer": "https://example.com/ appears in the sources. Harborline Realty is not named.",
47 "citations": ["https://example.com/"],
48 "namedBusiness": False,
49 },
50 {
51 "promptText": "Who are the best real estate agents in Kent WA?",
52 "surface": "perplexity",
53 "answer": "A short list of firms is discussed, citing https://example.com/.",
54 "citations": ["https://example.com/"],
55 "namedBusiness": False,
56 },
57 ],
58}
59
60
61run = client.actor("steady-scrape/geo-page-changes").call(run_input=run_input)
62
63
64print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
65for item in client.dataset(run.default_dataset_id).iterate_items():
66 print(item)
67
68