1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "urls": [
11 "https://www.olx.pl/motoryzacja/samochody/bmw/",
12 "https://www.olx.pl/motoryzacja/samochody/",
13 "https://www.olx.pl/nieruchomosci/mieszkania/warszawa/",
14 "https://www.olx.pl/oferty/q-iphone/",
15 "https://www.olx.pl/motoryzacja/samochody/bmw/?page=2",
16 "https://www.olx.pl/motoryzacja/samochody/bmw/?search%5Bfilter_float_price%3Afrom%5D=10000&search%5Border%5D=filter_float_price%3Aasc",
17 "https://www.olx.pl/d/oferta/ksiazka-encyklopedia-popularna-olesiejuk-CID751-IDRFFqw.html",
18 "https://www.olx.pl/oferty/uzytkownik/1VRzN/",
19 "https://m.olx.pl/motoryzacja/samochody/bmw/",
20 "https://www.olx.ro/auto-masini-moto-ambarcatiuni/autoturisme/",
21 "https://www.olx.pt/carros-motos-e-barcos/carros/",
22 "https://www.olx.ua/uk/transport/legkovye-avtomobili/",
23 "https://www.olx.kz/transport/legkovye-avtomobili/",
24 "https://www.olx.bg/ads/",
25 ],
26 "country": "pl",
27 "proxyConfiguration": { "useApifyProxy": True },
28 "incrementalMode": False,
29 "emitUnchanged": False,
30 "emitExpired": False,
31 "ignoreFieldsForChanges": [],
32}
33
34
35run = client.actor("abotapi/olx-scraper").call(run_input=run_input)
36
37
38print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
39for item in client.dataset(run.default_dataset_id).iterate_items():
40 print(item)
41
42