1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "keywords": "restaurant",
11 "urls": [
12 "https://www.businessesforsale.com/search?Keywords=restaurant",
13 "https://www.businessesforsale.com/search",
14 "https://www.businessesforsale.com/search?Keywords=restaurant&Page=2",
15 "https://www.businessesforsale.com/search/restaurants-for-sale",
16 "https://www.businessesforsale.com/search/restaurants-for-sale?Page=2",
17 "https://www.businessesforsale.com/search?CategoryIds=1358302&Keywords=restaurant",
18 "https://www.businessesforsale.com/search?Keywords=restaurant&Sort=PriceAsc",
19 "https://www.businessesforsale.com/search?Price.From=100000&Price.To=500000&Keywords=cafe",
20 "https://www.businessesforsale.com/search/businesses-for-sale",
21 "https://australia.businessesforsale.com/australian/search?Keywords=restaurant",
22 "https://uk.businessesforsale.com/uk/agents/davey-co",
23 "https://uk.businessesforsale.com/uk/welcoming-community-pub-restaurant-same-family-ownership-40-years-successful-business-with-scope-to-grow-50-50-wet-to-food-traditional-menus-lounge-tap-room-2-snug-lounges-restaurant-for-60-for-sale.aspx",
24 ],
25 "proxy": {
26 "useApifyProxy": True,
27 "apifyProxyGroups": ["RESIDENTIAL"],
28 "apifyProxyCountry": "US",
29 },
30 "incrementalMode": False,
31 "emitUnchanged": False,
32 "emitExpired": False,
33 "ignoreFieldsForChanges": [],
34}
35
36
37run = client.actor("abotapi/businessesforsale-com-scraper").call(run_input=run_input)
38
39
40print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
41for item in client.dataset(run.default_dataset_id).iterate_items():
42 print(item)
43
44