1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "feedText": `id title description link image_link price sale_price availability brand gtin certification google_product_category
12SKU-100 Bosch Serie 4 dishwasher 60 cm SMV4EVX00E Fully integrated dishwasher, 14 place settings. https://shop.example/p/100 https://shop.example/i/100.jpg 549.00 EUR in_stock Bosch 4242005315253 EC:EPREL:1319322 Home & Garden > Kitchen & Dining > Kitchen Appliances > Dishwashers
13SKU-101 Liebherr fridge freezer CNd 5203 Free-standing fridge freezer with NoFrost. https://shop.example/p/101 https://shop.example/i/101.jpg 899.00 EUR in_stock Liebherr 4016803071624 Home & Garden > Kitchen & Dining > Kitchen Appliances > Refrigerators
14SKU-102 ACME KETTLE STEEL 1.7 L Kettle. https://shop.example/p/102 29.90 29.90 EUR available Acme 1234567890123
15SKU-102 Acme toaster 2 slots Two-slot toaster with defrost function. shop.example/p/103 https://shop.example/i/103.jpg 24.90 EUR in_stock`
16};
17
18
19const run = await client.actor("signalone-emetzor/google-shopping-feed-validator").call(input);
20
21
22console.log('Results from dataset');
23console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
24const { items } = await client.dataset(run.defaultDatasetId).listItems();
25items.forEach((item) => {
26 console.dir(item);
27});
28
29