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 "id": "etsy-example-1",
14 "platform": "etsy",
15 "title": "Hand-poured soy candle, lavender and cedar, 8 oz amber jar",
16 "tags": [
17 "soy candle",
18 "lavender candle",
19 "cedar candle",
20 "amber jar candle",
21 "hand poured candle",
22 "scented candle",
23 "gift for her",
24 "housewarming gift",
25 "cozy home decor",
26 "vegan candle",
27 "8 oz candle",
28 "relaxing candle"
29 ]
30 },
31 {
32 "id": "shopify-example-1",
33 "platform": "shopify",
34 "title": "Linen Cross-Back Apron",
35 "meta_title": "Linen Cross-Back Apron with Two Pockets, Hand-Sewn, One Size, Oat",
36 "meta_description": "Cross-back linen apron with two front pockets. Hand-sewn, one size, oat colour. Machine washable."
37 }
38 ]
39};
40
41
42const run = await client.actor("autoaugeo/listing-seo-length-auditor-for-online-se-8a73").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52