1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "feed": [
12 {
13 "sku": "A",
14 "price": "100",
15 "currency": "GBP",
16 "sale_price": "80",
17 "sale_start": "2026-10-06T06:00:00+00:00",
18 "sale_end": "2026-10-06T07:00:00+00:00",
19 "price_basis": "tax_inclusive",
20 "url": "https://shop.example/product/a",
21 "html": "<script type=\"application/ld+json\">{\"@type\": \"Product\", \"sku\": \"A\", \"offers\": {\"@type\": \"Offer\", \"price\": \"80\", \"priceCurrency\": \"GBP\"}}</script>",
22 "evidence_label": "synthetic"
23 }
24 ],
25 "baseline": [
26 {
27 "sku": "A",
28 "url": "https://shop.example/product/a",
29 "checked_at": "2026-10-06T06:59:59Z",
30 "status": "match",
31 "reason": "Declared price terms match",
32 "pointer": "0:/offers",
33 "expected": "80",
34 "observed": "80",
35 "currency": "GBP",
36 "price_basis": "tax_inclusive",
37 "scope_hash": "33a739a82f002a69e1981e15dc9b7c3db68f71019343412c0753c3ce4cf9e1b6",
38 "evidence_label": "synthetic",
39 "captured_at": null,
40 "html_sha256": "2f629aa705be8fca4c85dba1f51fa9706e050367e5cc212a952d42999abd6d1b",
41 "evaluation_mode": "simulation",
42 "basis_evidence": "caller-declared unless explicit JSON-LD tax flag; not independently verified",
43 "action": "Declared static fields agree; visible price, checkout and Merchant Center approval untested.",
44 "classification": "clear"
45 }
46 ],
47 "checkedAt": "2026-10-06T07:00:00Z",
48 "fetchPublicUrls": false,
49 "mode": "simulation"
50};
51
52
53const run = await client.actor("wwhynot/merchant-sale-transition-audit").call(input);
54
55
56console.log('Results from dataset');
57console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
58const { items } = await client.dataset(run.defaultDatasetId).listItems();
59items.forEach((item) => {
60 console.dir(item);
61});
62
63