Apartments.com Scraper 🏡

  • epctex/apartments-scraper
  • Modified
  • Users 389
  • Runs 470.9k
  • Created by Author's avatarepctex

Scrape Apartments.com to crawl millions of real estate properties nationwide. Specify any US location and extract data on all available properties in that area. Our real estate scraper lets you filter and limit the results by page or total number. You can also target a specific property or area.

Free trial for 7 days

Then $30.00/month

No credit card required now

Apartments.com Scraper 🏡

Free trial for 7 days

Then $30.00/month

To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running Actors via the API in Apify Docs.

from apify_client import ApifyClient

# Initialize the ApifyClient with your API token
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [
        "https://www.apartments.com/sobe-apartment-rentals-miami-beach-fl/26xc7jb/",
        "https://www.apartments.com/apartments/miami-fl/student-housing/",
        "https://www.apartments.com/?sk=544b92fe1f766950d57299dc624e9ff9&bb=0nijpwq7qH0t1s0oB",
    ],
    "maxItems": 50,
    "endPage": 100,
    "extendOutputFunction": "($) => { return {} }",
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/apartments-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)