1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "phones": [
12 "+1 (212) 555-0123 ext. 55",
13 "+39 06 6982",
14 {
15 "phone": "020 7946 0958",
16 "country": "GB"
17 },
18 "0044 20 7946 0958",
19 "+1 800 555 0199",
20 "+1 900 555 0123",
21 "12345",
22 "+39 06 6982"
23 ],
24 "convertVanityLetters": false,
25 "dedupe": true,
26 "onlyValid": false,
27 "onlyNew": false,
28 "seenStoreName": "phone-validator-seen-hashes"
29};
30
31
32const run = await client.actor("far003/phone-number-validator-e164").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42