1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "feedText": "<?xml version=\"1.0\"?><rss xmlns:g=\"http://base.google.com/ns/1.0\"><channel><item><g:id>SMOKE-1</g:id><g:title>Smoke Test Shoe</g:title><g:description>A comfortable smoke-test shoe.</g:description><g:link>https://example.com/products/smoke-shoe</g:link><g:image_link>https://example.com/images/smoke-shoe.jpg</g:image_link><g:brand>ExampleBrand</g:brand><g:price>49.99 USD</g:price><g:availability>in_stock</g:availability></item><item><g:id>SMOKE-BAD</g:id><g:title>Broken</g:title><g:description>Missing link</g:description><g:image_link>https://example.com/x.jpg</g:image_link><g:brand>ExampleBrand</g:brand><g:price>1.00 USD</g:price><g:availability>in_stock</g:availability></item></channel></rss>",
12 "sellerName": "Example Store",
13 "targetCountries": [
14 "US"
15 ],
16 "formatHint": "auto",
17 "isAdsEligible": true,
18 "excludeInvalidRows": true,
19 "maxProducts": 50,
20 "schemaVersion": "openai-ads-2026-09-09"
21};
22
23
24const run = await client.actor("kondasviktor/openai-ads-feed-converter").call(input);
25
26
27console.log('Results from dataset');
28console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
29const { items } = await client.dataset(run.defaultDatasetId).listItems();
30items.forEach((item) => {
31 console.dir(item);
32});
33
34