1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "answers": [
10 {
11 "id": "sample-a",
12 "query": "Analytics for small shops",
13 "provider": "Sample engine A",
14 "answer": "Acme Analytics is one option. See [Acme guide](https://docs.acme.example/guide?utm_source=demo). Northstar is also mentioned.",
15 "citations": [{ "url": "https://docs.acme.example/guide?utm_source=demo#top" }],
16 },
17 {
18 "id": "sample-b",
19 "query": "Analytics for small shops",
20 "provider": "Sample engine B",
21 "answer": "Northstar is an option. [Independent comparison](https://review.example/compare) mentions Acme without linking its site.",
22 },
23 ],
24 "brands": [
25 {
26 "name": "Acme",
27 "aliases": ["Acme Analytics"],
28 "domains": ["acme.example"],
29 },
30 {
31 "name": "Northstar",
32 "domains": ["northstar.example"],
33 },
34 ],
35}
36
37
38run = client.actor("danielmichalek/ai-answer-citation-auditor").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