1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "targetUrl": "https://example.com/product",
10 "competitorUrl": "https://competitor.example/product",
11 "query": "Does Acme export CSV?",
12 "evidence": {
13 "answer": "The competitor offers CSV exports.",
14 "citedUrls": ["https://competitor.example/product"],
15 },
16 "targetHtml": "<!doctype html><html><body><h1>Acme</h1><p>Acme exports reports in CSV format.</p></body></html>",
17 "competitorHtml": "<html><body><h1>CSV exports</h1></body></html>",
18 "facts": [{
19 "text": "Acme exports reports in CSV format.",
20 "sourceUrl": "https://example.com/product",
21 }],
22}
23
24
25run = client.actor("bono718/citation-remediation-payload-generator").call(run_input=run_input)
26
27
28print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
29for item in client.dataset(run.default_dataset_id).iterate_items():
30 print(item)
31
32