1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 {
13 "url": "https://example.com"
14 }
15 ],
16 "domains": [
17 "example.com"
18 ],
19 "googleMapsRows": [
20 {
21 "name": "Example Coffee",
22 "website": "https://example.com"
23 }
24 ],
25 "businessRows": [
26 {
27 "company": "Example Org",
28 "domain": "example.org"
29 }
30 ],
31 "shopifyRows": [
32 {
33 "shopDomain": "example-store.com"
34 }
35 ],
36 "serpRows": [
37 {
38 "title": "Example Result",
39 "link": "https://example.net/contact"
40 }
41 ],
42 "rows": [
43 {
44 "website": "https://example.io"
45 }
46 ]
47};
48
49
50const run = await client.actor("isotonic/website-contact-social-link-extractor").call(input);
51
52
53console.log('Results from dataset');
54console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
55const { items } = await client.dataset(run.defaultDatasetId).listItems();
56items.forEach((item) => {
57 console.dir(item);
58});
59
60