1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searchKeywords": [],
10 "startUrls": [{ "url": "https://www.facebook.com/marketplace/1312315172298841/search?minPrice=10000&maxMileage=60000&minYear=1980&sortBy=creation_time_descend&query=Vehicles&category_id=546583916084032&exact=false&referral_ui_component=category_menu_item" }],
11 "locationSlug": "dallas",
12 "duplicateCheckApiUrl": "https://ccscraperapi.up.railway.app/api/listings/exists",
13 "proxyConfiguration": {
14 "useApifyProxy": True,
15 "apifyProxyGroups": ["RESIDENTIAL"],
16 "apifyProxyCountry": "US",
17 },
18}
19
20
21run = client.actor("fmchisti/facebook-marketplace-vehicles-scraper").call(run_input=run_input)
22
23
24print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
25for item in client.dataset(run["defaultDatasetId"]).iterate_items():
26 print(item)
27
28