Actor picture

Trulia Scraper

onidivo/trulia-scraper

Crawl the Trulia real estate listings site and extract data about homes for sale. Scrape home details for multiple search locations (City, Neighborhood, Zip, and County) and various search criteria and filters. Download and use the data whatever way you want.

Free trial for 7 days

Then $10/month

No credit card required now

Author's avatarOnidivo Technologies
  • Modified
  • Users21
  • Runs75
Actor picture

Trulia Scraper

Free trial for 7 days

Then $10/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.

const { ApifyClient } = require('apify-client');

// Initialize the ApifyClient with API token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.trulia.com/property/7095741518-37901-Ocean-Ridge-Dr-Gualala-CA-95445"
        }
    ],
    "searchLocations": [
        "san francisco"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

(async () => {
    // Run the actor and wait for it to finish
    const run = await client.actor("onidivo/trulia-scraper").call(input);

    // Fetch and print actor results from the run's dataset (if any)
    console.log('Results from dataset');
    const { items } = await client.dataset(run.defaultDatasetId).listItems();
    items.forEach((item) => {
        console.dir(item);
    });
})();