1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "pages": [
12 {
13 "url": "https://acme-analytics.example.com/",
14 "title": "Acme Analytics — demand forecasting for retailers",
15 "text": "Acme Analytics helps mid-size retailers forecast demand. Connect Shopify, NetSuite or your POS, and get store-level forecasts every morning. Trusted by 300 retail brands in the US, UK and Canada. Start a 14-day free trial — plans from $49 per month."
16 },
17 {
18 "url": "https://brightsmile-dental.example.org/",
19 "title": "Bright Smile Dental — family dentist in Austin, TX",
20 "text": "Bright Smile Dental is a family-owned dental practice in South Austin. Dr. Lee and our team offer cleanings, fillings, Invisalign and same-day crowns. New patients welcome — call or book online. We accept most PPO insurance plans."
21 }
22 ],
23 "icp": "Independent dental practices (not chains)"
24};
25
26
27const run = await client.actor("leoworks/company-website-classifier").call(input);
28
29
30console.log('Results from dataset');
31console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
32const { items } = await client.dataset(run.defaultDatasetId).listItems();
33items.forEach((item) => {
34 console.dir(item);
35});
36
37