1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "forms": [
12 "I-485",
13 "I-765",
14 "N-400"
15 ],
16 "preferences": [
17 "EB-1",
18 "EB-2",
19 "EB-3",
20 "F2A"
21 ],
22 "countries": [
23 "all",
24 "india",
25 "china"
26 ],
27 "tableTypes": [
28 "final_action"
29 ],
30 "proxyConfiguration": {
31 "useApifyProxy": false
32 }
33};
34
35
36const run = await client.actor("talcoe/uscis-processing-times").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46