1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "enableListingSearch": True,
10 "searchKeywords": [
11 "carhartt detroit jacke",
12 "vintage levis 501",
13 "patagonia fleece",
14 ],
15 "searchMaxResults": 10,
16 "searchSort": "relevance",
17 "searchCondition": "",
18 "searchLeadDetails": False,
19 "searchFetchFullDetails": False,
20 "enableListingDetails": False,
21 "listingIds": [],
22 "listingUrls": [],
23 "enableClosetListings": False,
24 "sellerIds": ["33915083"],
25 "sellerMaxListings": 30,
26 "enableSellerProfile": False,
27 "enableSoldHistory": False,
28 "soldMaxItems": 30,
29 "enableScrapeByUrl": False,
30 "scrapeUrls": ["https://www.kleinanzeigen.de/s-suchanfrage.html?keywords=carhartt+jacke&sortBy=creationTime"],
31 "webhookFormat": "json",
32 "proxyConfiguration": {
33 "useApifyProxy": True,
34 "apifyProxyGroups": ["RESIDENTIAL"],
35 "apifyProxyCountry": "DE",
36 },
37}
38
39
40run = client.actor("b2b_leads/kleinanzeigen-real-time-data-scraper").call(run_input=run_input)
41
42
43print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
44for item in client.dataset(run.default_dataset_id).iterate_items():
45 print(item)
46
47