1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "items": [
10 {
11 "claim": "The Constitution's preamble says the people ordained it to form a more perfect Union.",
12 "url": "http://www.archives.gov/founding-docs/constitution-transcript",
13 "quote": "We the People of the United States, in Order to form a more perfect Union",
14 },
15 {
16 "claim": "The preamble still begins with the words We the People.",
17 "url": "https://www.archives.gov/founding-docs/constitution-transcript",
18 "quote": "we the people of the united states, in order to form a more perfect union",
19 },
20 {
21 "claim": "The Constitution's preamble names a colony on Mars.",
22 "url": "https://www.archives.gov/founding-docs/constitution-transcript",
23 "quote": "We the Robots of Mars, in Order to form a more perfect Colony",
24 },
25 {
26 "claim": "The National Archives publishes a transcription of the Declaration of Independence.",
27 "url": "https://www.archives.gov/founding-docs/declaration-transcript",
28 "quote": None,
29 },
30 {
31 "claim": "Python is a high-level, general-purpose programming language.",
32 "url": "https://en.wikipedia.org/wiki/Python_(programming_language)",
33 "quote": "Python is a high-level, general-purpose programming language",
34 },
35 {
36 "claim": "Python was invented by Linus Torvalds as a spreadsheet macro language.",
37 "url": "https://en.wikipedia.org/wiki/Python_(programming_language)",
38 "quote": "Python was invented by Linus Torvalds as a spreadsheet macro language",
39 },
40 {
41 "claim": "A National Archives page documents this citation-verifier demo.",
42 "url": "https://www.archives.gov/founding-docs/citation-claim-verifier-missing-page",
43 "quote": "This page documents the citation verifier.",
44 },
45 {
46 "claim": "The W3C dummy PDF says Dummy PDF file.",
47 "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
48 "quote": "Dummy PDF file",
49 },
50 ],
51 "inlineText": "",
52 "maxItems": 50,
53 "maxChargeUsd": 5,
54 "llmProvider": "none",
55 "llmModel": "",
56 "checkWayback": True,
57 "browserFallback": False,
58 "alertOnlyOnChange": False,
59 "dedupe": True,
60 "requestTimeoutSecs": 20,
61 "maxConcurrency": 4,
62 "maxRedirects": 5,
63}
64
65
66run = client.actor("plusonets/citation-claim-verifier").call(run_input=run_input)
67
68
69print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
70for item in client.dataset(run.default_dataset_id).iterate_items():
71 print(item)
72
73