Trulia.com Scraper

  • epctex/trulia-scraper
  • Modified
  • Users 4
  • Runs 241
  • Created by Author's avatarepctex

Scrape Trulia.com to crawl millions of real estate properties nationwide. Crawl real estate listings and extract descriptions, images, features, pricing, property details, neighborhood, nearby schools, and all other features. You can specify search terms, filters, and much more.

Free trial for 3 days

Then $15.00/month

No credit card required now

Trulia.com Scraper

Free trial for 3 days

Then $15.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.trulia.com/p/ny/bronx/895-tiffany-st-bronx-ny-10459--2008893028",
        "https://www.trulia.com/home/364-Ovington-Ave-Brooklyn-NY-11209-112508280",
        "https://www.trulia.com/building/the-tides-at-arverne-by-the-sea-190-beach-69th-st-arverne-ny-11692-2355011519",
        "https://www.trulia.com/sold/New_York,NY/",
        "https://www.trulia.com/for_rent/New_York,NY/",
        "https://www.trulia.com/for_sale/New_York,NY/p_oh/",
        "https://www.trulia.com/for_sale/New_York,NY/2p_beds/50000p_price/APARTMENT,CONDO,COOP,SINGLE-FAMILY_HOME_type/fsbo_lt/",
    ],
    "maxItems": 20,
    "endPage": 1,
    "extendOutputFunction": "($) => { return {} }",
    "customMapFunction": "(object) => { return {...object} }",
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/trulia-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)