1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "metros": [
13 "chicago"
14 ],
15 "sinceDays": 30,
16 "maxItemsPerDataset": 0,
17 "urls": [
18 "https://data.cityofnewyork.us/resource/9rz4-mjek.json?$limit=2",
19 "https://data.cityofchicago.org/resource/22u3-xenr.json?$limit=2&$offset=2&$order=:id",
20 "https://data.cityofchicago.org/resource/22u3-xenr.json?$where=violation_date>'2026-01-01'&$limit=1",
21 "https://datacatalog.cookcountyil.gov/resource/55ju-2fs9.json?$limit=1",
22 "https://data.kingcounty.gov/resource/nx4x-daw6.json?$limit=1",
23 "https://data.nola.gov/resource/d52w-8nva.json?$limit=1",
24 "https://data.cityofchicago.org/resource/22u3-xenr.csv?$limit=2",
25 "https://data.cityofchicago.org/d/22u3-xenr",
26 "https://data.cityofchicago.org/api/views/22u3-xenr/rows.json?$limit=1"
27 ],
28 "maxItems": 20,
29 "maxPages": 0,
30 "proxy": {
31 "useApifyProxy": true
32 },
33 "incrementalMode": false,
34 "emitUnchanged": false,
35 "emitExpired": false
36};
37
38
39const run = await client.actor("abotapi/distressed-us-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49