1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [
10 "https://www.rightmove.co.uk/properties/133723646/",
11 "https://www.rightmove.co.uk/properties/130147355/",
12 "https://www.rightmove.co.uk/property-to-rent/find/PropertyLoop/London.html?locationIdentifier=BRANCH%5E222287&propertyStatus=all&includeLetAgreed=true&_includeLetAgreed=on",
13 "https://www.rightmove.co.uk/property-for-sale/find/Foxtons/Chiswick.html?locationIdentifier=BRANCH%5E15951&includeSSTC=true&_includeSSTC=on",
14 "https://www.rightmove.co.uk/student-accommodation/find.html?locationIdentifier=REGION%5E87490&insId=1",
15 "https://www.rightmove.co.uk/property-for-sale/find.html?locationIdentifier=REGION%5E87490&propertyTypes=&includeSSTC=false&mustHave=&dontShow=&furnishTypes=&keywords=",
16 "https://www.rightmove.co.uk/property-to-rent/find.html?searchType=RENT&locationIdentifier=REGION%5E87490&insId=1&radius=0.0&minPrice=&maxPrice=&minBedrooms=&maxBedrooms=&displayPropertyType=&maxDaysSinceAdded=&sortByPriceDescending=&_includeLetAgreed=on&primaryDisplayPropertyType=&secondaryDisplayPropertyType=&oldDisplayPropertyType=&oldPrimaryDisplayPropertyType=&letType=&letFurnishType=&houseFlatShare=",
17 "https://www.rightmove.co.uk/new-homes-for-sale/find.html?searchType=SALE&locationIdentifier=REGION%5E87490&insId=1&radius=0.0&minPrice=&maxPrice=&minBedrooms=&maxBedrooms=&displayPropertyType=&maxDaysSinceAdded=&_includeSSTC=on&sortByPriceDescending=&primaryDisplayPropertyType=&secondaryDisplayPropertyType=&oldDisplayPropertyType=&oldPrimaryDisplayPropertyType=&newHome=true&auction=false",
18 "https://www.rightmove.co.uk/property-for-sale/find.html?locationIdentifier=REGION%5E87490&index=48&propertyTypes=&includeSSTC=false&mustHave=&dontShow=&furnishTypes=&keywords=",
19 "https://www.rightmove.co.uk/property-to-rent/find.html?locationIdentifier=REGION%5E87490&index=960&propertyTypes=&includeLetAgreed=false&mustHave=&dontShow=&furnishTypes=&keywords=",
20 ],
21 "maxItems": 20,
22 "endPage": 1,
23 "extendOutputFunction": "($) => { return {} }",
24 "customMapFunction": "(object) => { return {...object} }",
25 "proxy": { "useApifyProxy": True },
26}
27
28
29run = client.actor("epctex/rightmove-scraper").call(run_input=run_input)
30
31
32print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
33for item in client.dataset(run["defaultDatasetId"]).iterate_items():
34 print(item)
35
36