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 "Paris"
14 ],
15 "urls": [
16 "https://www.seloger.com/classified-search?distributionTypes=Buy&estateTypes=House,Apartment&locations=AD08FR31096",
17 "https://www.seloger.com/classified-search?distributionTypes=Rent&estateTypes=Apartment&locations=AD08FR31096",
18 "https://www.seloger.com/classified-search?distributionTypes=Buy&estateTypes=Apartment&locations=AD08FR31096&projectTypes=Resale",
19 "https://www.seloger.com/classified-search?distributionTypes=Buy&estateTypes=House,Apartment&locations=AD08FR31096&page=2",
20 "https://www.seloger.com/classified-search?distributionTypes=Buy&estateTypes=Apartment&locations=AD08FR31096&priceMax=500000&numberOfRoomsMin=2&order=PriceAsc",
21 "https://www.seloger.com/classified-search?distributionTypes=Buy&estateTypes=Apartment&projectTypes=Stock,Planned,Building&locations=AD08FR31096"
22 ],
23 "proxy": {
24 "useApifyProxy": true,
25 "apifyProxyGroups": [
26 "RESIDENTIAL"
27 ]
28 },
29 "incrementalMode": false,
30 "emitUnchanged": false,
31 "emitExpired": false,
32 "ignoreFieldsForChanges": []
33};
34
35
36const run = await client.actor("abotapi/seloger-france-scraper").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