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 "locations": [
13 "Capital Federal"
14 ],
15 "urls": [
16 "https://www.zonaprop.com.ar/departamentos-venta-palermo.html",
17 "https://www.zonaprop.com.ar/departamentos-venta-palermo-pagina-2.html",
18 "https://www.zonaprop.com.ar/inmuebles-venta-capital-federal.html",
19 "https://www.zonaprop.com.ar/casas-venta-cordoba.html",
20 "https://www.zonaprop.com.ar/departamentos-venta-palermo-orden-precio-ascendente.html",
21 "https://www.zonaprop.com.ar/departamentos-alquiler-capital-federal-2-ambientes.html",
22 "https://www.zonaprop.com.ar/departamentos-venta-palermo-2-habitaciones.html",
23 "https://www.zonaprop.com.ar/departamentos-venta-palermo-mas-de-2-banos.html",
24 "https://www.zonaprop.com.ar/departamentos-venta-palermo-100000-200000-dolar.html",
25 "https://www.zonaprop.com.ar/departamentos-venta-palermo-menos-200000-dolar.html",
26 "https://www.zonaprop.com.ar/departamentos-venta-palermo-con-pileta.html",
27 "https://www.zonaprop.com.ar/departamentos-alquiler-temporal-palermo.html",
28 "https://www.zonaprop.com.ar/propiedades/clasificado/veclapin-venta-duplex-2-ambientes-con-cochera-en-palermo-60051784.html",
29 "https://www.zonaprop.com.ar/inmobiliarias/aguilar-bugeau-valor-inmobiliario_30351457-inmuebles.html"
30 ],
31 "proxy": {
32 "useApifyProxy": true,
33 "apifyProxyGroups": [
34 "RESIDENTIAL"
35 ],
36 "apifyProxyCountry": "AR"
37 },
38 "incrementalMode": false,
39 "emitUnchanged": false,
40 "emitExpired": false
41};
42
43
44const run = await client.actor("abotapi/zonaprop-scraper").call(input);
45
46
47console.log('Results from dataset');
48console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54