1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "baselineId": "baseline-1",
12 "releaseId": "release-2",
13 "observedAt": "2026-10-10T23:00:00Z",
14 "expectedUrls": [
15 "https://store.example/products/a"
16 ],
17 "before": [
18 {
19 "url": "https://store.example/products/a",
20 "html": "<html><link rel=\"canonical\" href=\"https://store.example/products/a\"><meta name=\"robots\" content=\"index,follow\"><script type=\"application/ld+json\">{\"@type\": \"Product\", \"@id\": \"a\", \"sku\": \"SKU-a\", \"offers\": {\"@type\": \"Offer\", \"price\": \"19.90\", \"priceCurrency\": \"USD\", \"availability\": \"https://schema.org/InStock\"}}</script></html>",
21 "status": 200
22 }
23 ],
24 "after": [
25 {
26 "url": "https://store.example/products/a",
27 "html": "<html><link rel=\"canonical\" href=\"https://store.example/products/a\"><meta name=\"robots\" content=\"index,follow\"><script type=\"application/ld+json\">{\"@type\": \"Product\", \"@id\": \"a\", \"sku\": \"SKU-a\", \"offers\": {\"@type\": \"Offer\", \"price\": \"19.90\", \"priceCurrency\": \"USD\", \"availability\": \"https://schema.org/InStock\"}}</script></html>",
28 "status": 200
29 }
30 ]
31};
32
33
34const run = await client.actor("cygnix_labs/cygnix-storefront-release-proof").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44