1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "records": [
12 {
13 "id": "row-1",
14 "first_name": "Alexandra",
15 "last_name": "Testperson",
16 "state": "TX",
17 "city": "Austin",
18 "title": "Cardiologist"
19 },
20 {
21 "id": "row-2",
22 "first_name": "Bill",
23 "last_name": "Samplename",
24 "state": "OH",
25 "title": "Nurse Practitioner"
26 },
27 {
28 "id": "row-3",
29 "first_name": "Priya",
30 "last_name": "Exampleton-Ray",
31 "state": "California"
32 }
33 ]
34};
35
36
37const run = await client.actor("overlookdata/npimcp-resolve").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47