1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "records": [
10 {
11 "id": "blue-variant",
12 "url": "https://shop.example/shirt?color=blue",
13 "sku": "SKU-BLUE",
14 "price": "24.90",
15 "currency": "USD",
16 "availability": "in_stock",
17 "gtin": "0012345678905",
18 },
19 {
20 "id": "wrong-currency",
21 "url": "https://shop.example/mug",
22 "sku": "MUG",
23 "price": "24.90",
24 "currency": "USD",
25 "availability": "in_stock",
26 },
27 {
28 "id": "conflicting-prices",
29 "url": "https://shop.example/lamp",
30 "sku": "LAMP",
31 "price": "24.90",
32 "currency": "USD",
33 "availability": "in_stock",
34 },
35 {
36 "id": "stock-unknown",
37 "url": "https://shop.example/hat",
38 "sku": "HAT",
39 "price": "24.90",
40 "currency": "USD",
41 "availability": "in_stock",
42 },
43 {
44 "id": "broken-markup",
45 "url": "https://shop.example/bag",
46 "sku": "BAG",
47 "price": "24.90",
48 "currency": "USD",
49 "availability": "in_stock",
50 },
51 {
52 "id": "group-review",
53 "url": "https://shop.example/shoe",
54 "sku": "SHOE",
55 "price": "24.90",
56 "currency": "USD",
57 "availability": "in_stock",
58 },
59 {
60 "id": "snapshot-needed",
61 "url": "https://shop.example/missing",
62 "sku": "NONE",
63 "price": "24.90",
64 "currency": "USD",
65 "availability": "in_stock",
66 },
67 ],
68 "pages": [
69 {
70 "url": "https://shop.example/shirt?color=blue",
71 "html": "<!doctype html><html><head><script>/* theme */</script><script type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Product\",\"sku\":\"SKU-RED\",\"offers\":{\"@type\":\"Offer\",\"price\":\"19.90\",\"priceCurrency\":\"USD\",\"availability\":\"https://schema.org/InStock\"}},{\"@type\":\"Product\",\"sku\":\"SKU-BLUE\",\"offers\":{\"@type\":\"Offer\",\"price\":\"24.90\",\"priceCurrency\":\"USD\",\"availability\":\"https://schema.org/InStock\"},\"gtin13\":\"0012345678905\"}]}</script></head><body>Shirt</body></html>",
72 "fetchedAt": "2026-09-29T09:00:00Z",
73 },
74 {
75 "url": "https://shop.example/mug",
76 "jsonLd": "{\"@type\":\"Product\",\"sku\":\"MUG\",\"offers\":{\"@type\":\"Offer\",\"price\":\"24.90\",\"priceCurrency\":\"EUR\",\"availability\":\"https://schema.org/InStock\"}}",
77 },
78 {
79 "url": "https://shop.example/lamp",
80 "jsonLd": "{\"@type\":\"Product\",\"sku\":\"LAMP\",\"offers\":[{\"@type\":\"Offer\",\"price\":\"24.90\",\"priceCurrency\":\"USD\",\"availability\":\"https://schema.org/InStock\"},{\"@type\":\"Offer\",\"price\":\"29.90\",\"priceCurrency\":\"USD\",\"availability\":\"https://schema.org/InStock\"}]}",
81 },
82 {
83 "url": "https://shop.example/hat",
84 "jsonLd": "{\"@type\":\"Product\",\"sku\":\"HAT\",\"offers\":{\"@type\":\"Offer\",\"price\":\"24.90\",\"priceCurrency\":\"USD\"}}",
85 },
86 {
87 "url": "https://shop.example/bag",
88 "jsonLd": "{\"@type\": \"Product\", broken",
89 },
90 {
91 "url": "https://shop.example/shoe",
92 "jsonLd": "{\"@type\":\"ProductGroup\",\"hasVariant\":[{\"@type\":\"Product\",\"sku\":\"SHOE\",\"offers\":{\"@type\":\"Offer\",\"price\":\"24.90\",\"priceCurrency\":\"USD\",\"availability\":\"https://schema.org/InStock\"}}]}",
93 },
94 ],
95}
96
97
98run = client.actor("h_murdock/merchant-feed-offer-audit").call(run_input=run_input)
99
100
101print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
102for item in client.dataset(run.default_dataset_id).iterate_items():
103 print(item)
104
105