1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "enableListingSearch": True,
10 "searchKeywords": [
11 "carhartt",
12 "vintage levis 501",
13 "patagonia fleece",
14 ],
15 "searchMaxResults": 10,
16 "searchCategoryId": "",
17 "searchSort": "date",
18 "searchDepartmentCode": "",
19 "searchOwnerType": "",
20 "searchFetchFullDetails": False,
21 "enableListingDetails": False,
22 "listingIds": [],
23 "listingUrls": [],
24 "enableStoreInventory": False,
25 "storeUrls": [],
26 "storeMaxListings": 30,
27 "enableSellerProfile": False,
28 "enableScrapeByUrl": False,
29 "scrapeUrls": ["https://www.leboncoin.fr/recherche?text=carhartt"],
30 "enablePriceHistory": False,
31 "watchlist": [],
32 "watchlistIds": [],
33 "webhookFormat": "json",
34 "proxyConfiguration": {
35 "useApifyProxy": True,
36 "apifyProxyGroups": ["RESIDENTIAL"],
37 "apifyProxyCountry": "US",
38 },
39}
40
41
42run = client.actor("b2b_leads/leboncoin-real-time-data-scraper").call(run_input=run_input)
43
44
45print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
46for item in client.dataset(run.default_dataset_id).iterate_items():
47 print(item)
48
49