1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "listings": [
12 {
13 "asin": "EXAMPLE-1",
14 "brand": "Example Home",
15 "title": "Bamboo Sheets Queen Size!! Antibacterial Bamboo Sheet Set, Cooling Bamboo Sheets, FREE SHIPPING",
16 "bullets": [
17 "MADE FROM BAMBOO: Eco-friendly fabric that stays cool ✅",
18 "Kills 99.9% of germs and dust mites while you sleep",
19 "Full refund if you are not satisfied",
20 "Deep pockets fit mattresses up to 16 inches"
21 ],
22 "description": "Questions? Visit our website www.examplehome.com"
23 },
24 {
25 "asin": "EXAMPLE-2",
26 "brand": "Example Kitchen",
27 "title": "Silicone Baking Mat Set of 3, Non-Stick Half Sheet Liners",
28 "bullets": [
29 "Non-stick: food-grade silicone, no parchment needed",
30 "Heat resistant from -40 to 480 degrees F",
31 "Reusable; rinse with warm soapy water"
32 ],
33 "description": "Fits standard half sheet pans (13 x 18 in)."
34 }
35 ]
36};
37
38
39const run = await client.actor("ultimatemc/amazon-listing-policy-checker").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49