# Trulia Scraper (`one-api/trulia-scraper`) Actor

Scrape Trulia listings, full property details, similar homes, local amenities, and location autocomplete. Search by location, ZIP, coordinates, or Trulia URL with price, beds, baths, sqft and property-type filters. One flat row per result plus full raw JSON.

- **URL**: https://apify.com/one-api/trulia-scraper.md
- **Developed by:** [ONE API](https://apify.com/one-api) (community)
- **Categories:** Lead generation, Real estate
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Trulia Scraper

Scrape **Trulia** listings, full property details, similar homes, local amenities, and location autocomplete — all from one Actor. Backed by [realtyapi.io](https://realtyapi.io)'s real-time Trulia API.

⭐️ Found this useful? Please leave 5 stars! Issues / requests: 📬 **support@realtyapi.io**

***

### What you can do

| Section | What it does | Input format |
|---|---|---|
| 🏠 **Property Details** | Full enriched details for one home — price, beds/baths, description, home facts, price history, taxes, HOA, schools, amenities, demographics, neighborhood | Trulia property URL, full street address, or listing ID — auto-detected per row |
| 🔎 **Search Listings** | Paginated search with filters | location string, ZIP, `lat,lng,radius_mi`, or a Trulia search URL |
| 🏘️ **Similar Homes** | Comparable homes for a property | Trulia property URL |
| 🍴 **Local Amenities** | Nearby restaurants, shops, groceries, etc. | Trulia property URL, or `lat,lng` |
| 🔤 **Autocomplete** | Search-box suggestions (cities, neighborhoods, ZIPs, counties, schools) | partial query string |

You can fill any combination of sections in a single run — leave the others empty.

***

### Output

Every listing / property / similar home / amenity / autocomplete suggestion is pushed as **one dataset row**, flattened to friendly columns plus a `Raw` column with the complete original JSON.

| Mode | Title | Property ID | Status | Price | Beds | Baths | Sqft | City | State | Zip | Listing URL | Raw |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| `search/bylocation` | 10455 SW 42nd Ter, Miami, FL 33165 | 44202084\_ZPID | For Sale | 720000 | 3 Beds | 2 Baths | 1,666 sqft | Miami | FL | 33165 | https://www.trulia.com/home/... | `{...}` |
| `details/byurl` | 1450 Brickell Ave, Miami, FL 33131 | 12345\_ZPID | For Sale | 985000 | 2 Beds | 2 Baths | 1,200 sqft | Miami | FL | 33131 | https://www.trulia.com/home/... | `{...}` |

Plus columns: `Listing ID`, `Listing Type`, `Address`, `County`, `Neighborhood`, `Latitude`, `Longitude`, `Date Listed`, `HOA`, `Photos` (cover image), `Photo Count`, `Listed By`, `Tags`, `Rating` (amenities).

For nested/large fields — full photo arrays, home facts, price history, tax history, schools, demographics, neighborhood stats — the complete upstream JSON is in the `Raw` column.

> **Note:** Trulia returns price/beds/baths/sqft as formatted strings (e.g. `"3 Beds"`, `"1,666 sqft"`). The `Price` column is parsed to a sortable number; `Beds` / `Baths` / `Sqft` keep their original formatted text.

***

### Sample input

```json
{
    "property_inputs": [
        "https://www.trulia.com/home/10455-sw-42nd-ter-miami-fl-33165-44202084",
        "1450 Brickell Ave, Miami, FL 33131"
    ],
    "search_inputs": ["Miami, FL", "33101", "25.7617,-80.1918,5"],
    "searchType": "FOR_SALE",
    "propertyType": "House,Condo",
    "priceRange": "min:300000,max:900000",
    "bedsRange": "min:2",
    "sortOrder": "newest",
    "pages": 2,
    "resultCount": 40,

    "similar_inputs": ["https://www.trulia.com/home/10455-sw-42nd-ter-miami-fl-33165-44202084"],
    "amenities_inputs": ["25.7617,-80.1918"],
    "autocomplete_inputs": ["miami"]
}
```

***

### Search filters (apply to all `search_inputs`)

- **searchType** — `FOR_SALE` (default) | `FOR_RENT` | `SOLD`
- **propertyType** — comma list of `House, Condo, Townhouse, Apartment, Multi_Family, Land, Mobile`
- **priceRange / bedsRange / bathsRange / sqftRange / yearBuiltRange / lotSizeRange** — `min:X` | `max:Y` | `min:X,max:Y` (baths support decimals, e.g. `2.5`)
- **sortOrder** — `relevance` (default), `newest`, `price_low`, `price_high`, `sqft`, `beds`, `baths`, `photos`
- **keywords** — free-text (e.g. `pool`, `waterfront`)
- **hasVirtualTour** — `true` to keep only listings with a virtual tour
- **soldWithin** — for `SOLD` searches, only homes sold within the last N days
- **pages** — how many pages to fetch per search (1–50)
- **resultCount** — listings per page (1–200, default 40)

Filters apply to **every** `search_inputs` row in the run.

***

### Pricing

**Pay per result** — you only pay for dataset items the Actor pushes. Failed inputs return a row with `Status: ERROR: ...` and are billed the same as a successful row.

To cap spend, set `Max paid dataset items` on the run page.

***

### Tips

- **Need one property?** Use the 🏠 **Property Details** section with a Trulia URL — it's the fastest, most reliable path and returns the full enriched detail (schools, amenities, demographics, neighborhood).
- **Listing ID lookup is slow.** A bare numeric ID has to be resolved back to a URL upstream (best-effort). Prefer a Trulia URL or full address when you have one.
- **Pull every listing in a city?** Use `search_inputs: ["City, ST"]` and increase `pages` (each page returns up to `resultCount` listings).
- **Lat/lng circle?** Format: `25.7617,-80.1918,5` (the last value is the radius in miles).
- **Amenities without a property?** Drop a raw `lat,lng` pair into the 🍴 section.
- **Resolve a Trulia search URL?** Paste it straight into 🔎 **Search Listings** — the URL is parsed into the right call internally.

# Actor input Schema

## `property_inputs` (type: `array`):

Full enriched details for a specific home (price, beds/baths, description, home facts, price history, taxes, HOA, schools, amenities, demographics, neighborhood). Auto-detects each row:
• `https://www.trulia.com/home/...` or `/home/...` → details by URL (fastest)
• `10455 SW 42nd Ter, Miami, FL 33165` → details by address
• `44202084` → details by listing ID (slow / best-effort — URL or address is strongly preferred)

## `search_inputs` (type: `array`):

Paginated listing search. Auto-detects each entry. Examples:
• `Miami, FL` (city/state, neighborhood, or free text)
• `33101` (ZIP code)
• `25.7617,-80.1918,5` (lat,lng,radius\_miles)
• `https://www.trulia.com/for_sale/Miami,FL/` (Trulia search URL)

The filters below apply to every search row. Each LISTING is pushed as one dataset item.

## `searchType` (type: `string`):

For Sale (default), For Rent, or Recently Sold. Applies to Search Listings and Autocomplete.

## `propertyType` (type: `string`):

Comma-separated. Leave empty for all. Allowed: House, Condo, Townhouse, Apartment, Multi\_Family, Land, Mobile.

## `priceRange` (type: `string`):

`min:300000`, `max:900000`, or `min:300000,max:900000`.

## `bedsRange` (type: `string`):

`min:3`, `max:5`, or `min:3,max:5`.

## `bathsRange` (type: `string`):

Decimals supported: `min:2`, `max:3.5`, or `min:2,max:3.5`.

## `sqftRange` (type: `string`):

`min:1000`, `max:3000`, or `min:1000,max:3000`.

## `yearBuiltRange` (type: `string`):

`min:1990`, `max:2020`, or `min:1990,max:2020`.

## `lotSizeRange` (type: `string`):

`min:5000`, `max:20000`, or `min:5000,max:20000`.

## `sortOrder` (type: `string`):

How to sort search results. Default: Relevance (Trulia's natural ordering).

## `keywords` (type: `string`):

Free-text keywords (e.g. `pool`, `waterfront`, `renovated`).

## `hasVirtualTour` (type: `boolean`):

Only keep listings that have a virtual tour.

## `soldWithin` (type: `integer`):

For Recently Sold searches: only homes sold within the last N days. Empty = no limit.

## `pages` (type: `integer`):

Each page = up to `Results per page` listings.

## `resultCount` (type: `integer`):

Listings per page (1–200). Default 40.

## `similar_inputs` (type: `array`):

Comparable / similar homes for a given Trulia property. One row = a Trulia property URL (e.g. `https://www.trulia.com/home/...`). Each similar home is pushed as one dataset item.

## `amenities_inputs` (type: `array`):

Nearby amenities (restaurants, shops, groceries, etc.). Each row is either a Trulia property URL or a `latitude,longitude` pair (e.g. `25.7617,-80.1918`). Each amenity is pushed as one dataset item.

## `amenitiesLimit` (type: `integer`):

How many amenities to return per Local Amenities row.

## `autocomplete_inputs` (type: `array`):

Trulia search-box suggestions: cities, neighborhoods, ZIPs, counties, schools. Each suggestion is pushed as one dataset item (Title + Status). Honors the Search Type above.

## Actor input object example

```json
{
  "property_inputs": [
    "https://www.trulia.com/home/10455-sw-42nd-ter-miami-fl-33165-44202084",
    "1450 Brickell Ave, Miami, FL 33131"
  ],
  "search_inputs": [
    "Miami, FL"
  ],
  "searchType": "FOR_SALE",
  "propertyType": "",
  "priceRange": "",
  "bedsRange": "",
  "bathsRange": "",
  "sqftRange": "",
  "yearBuiltRange": "",
  "lotSizeRange": "",
  "sortOrder": "relevance",
  "keywords": "",
  "hasVirtualTour": false,
  "pages": 1,
  "resultCount": 40,
  "amenitiesLimit": 30
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

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

// Prepare Actor input
const input = {
    "property_inputs": [
        "https://www.trulia.com/home/10455-sw-42nd-ter-miami-fl-33165-44202084",
        "1450 Brickell Ave, Miami, FL 33131"
    ],
    "search_inputs": [
        "Miami, FL"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("one-api/trulia-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = {
    "property_inputs": [
        "https://www.trulia.com/home/10455-sw-42nd-ter-miami-fl-33165-44202084",
        "1450 Brickell Ave, Miami, FL 33131",
    ],
    "search_inputs": ["Miami, FL"],
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "property_inputs": [
    "https://www.trulia.com/home/10455-sw-42nd-ter-miami-fl-33165-44202084",
    "1450 Brickell Ave, Miami, FL 33131"
  ],
  "search_inputs": [
    "Miami, FL"
  ]
}' |
apify call one-api/trulia-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,one-api/trulia-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zgF5jLuQ4bYuJREW2/builds/3K08CbwST17meN3if/openapi.json
