1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "records": [
10 {
11 "url": "https://example.com/help/delivery",
12 "markdown": """# Delivery policy
13Standard delivery takes three to five working days after dispatch. Tracking information is sent by email when the parcel leaves the warehouse. Delivery estimates exclude public holidays. Customers can contact support with their order number if tracking has not updated for two working days.
14""",
15 },
16 {
17 "url": "https://example.com/help/delivery?utm_source=newsletter",
18 "markdown": """# Delivery policy
19Standard delivery takes three to five working days after dispatch. Tracking information is sent by email when the parcel leaves the warehouse. Delivery estimates exclude public holidays. Customers can contact support with their order number if tracking has not updated for two working days.
20""",
21 },
22 {
23 "url": "https://example.com/help/returns",
24 "markdown": """# Returns policy
25Unused products can be returned within fourteen days of delivery. Keep the original packaging and contact support for return instructions before sending the parcel. Refunds are processed after the returned item has been inspected. This sample policy is fictional demonstration content.
26""",
27 },
28 {
29 "url": "https://example.com/archive/delivery",
30 "markdown": """# Delivery policy
31Standard delivery takes three to five working days after dispatch. Tracking information is sent by email when the parcel leaves the warehouse. Delivery estimates exclude public holidays. Customers can contact support with their order number if tracking has not updated for two working days.
32""",
33 },
34 {
35 "url": "https://example.com/help/empty",
36 "markdown": " ",
37 },
38 ],
39 "maxDocuments": 5,
40}
41
42
43run = client.actor("variable_mitts/rag-dataset-cleaner-evidence").call(run_input=run_input)
44
45
46print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
47for item in client.dataset(run.default_dataset_id).iterate_items():
48 print(item)
49
50