# Homes.com Scraper (`one-api/homes-scraper`) Actor

Scrape Homes.com (CoStar) US real estate. Enriched property details by id or URL; search for sale / rent / sold by location, ZIP, coordinates or URL; place autocomplete; and find agents by name with full profiles.

- **URL**: https://apify.com/one-api/homes-scraper.md
- **Developed by:** [ONE API](https://apify.com/one-api) (community)
- **Categories:** Lead generation, Real estate
- **Stats:** 28 total users, 12 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

## Homes.com Scraper

Scrape **Homes.com** (the **CoStar** US real-estate marketplace). Look up fully enriched property details by key or URL, search homes **for sale / for rent / sold** by location, ZIP code, coordinates + radius, or a homes.com results URL with filters, resolve places via autocomplete, and find real-estate agents by name with full agent profiles.

### What it does

- **🏠 Property Details** — auto-detects each input as a homes.com property key (`/details/byid`) or a `homes.com/property/.../<key>/` URL (`/details/byurl`); returns the full **enriched** record: price, beds, baths, square feet, lot size, year built, the full description and its "as of" date, HOA fee, public records (zoning, subdivision, county, parcel, MLS#), highlights, the complete feature list, open houses, the listing agent + phone, and every photo.
- **🔎 Search Listings** — auto-detects a homes.com results URL (`/search/byurl`), a 5-digit ZIP code (`/search/byzip`), or a free-text location (`/search/bylocation`). Deal type, property type, price / beds / baths filters and sort all apply.
- **📍 Search by Coordinates** — radius search around a `latitude,longitude` point with an optional radius in **miles** (`/search/bycoordinates`).
- **🔍 Location Autocomplete** — resolve free text (city / state / neighborhood / ZIP) to the homes.com place suggestions used by search (`/autocomplete`).
- **👤 Agents** — find agents by name (`/agent/search`), then pull a full agent profile by key or URL (`/agent/details`): office, location, phone, email, license, bio, photo, active-listing count, sold count and rating.

### Output

- **One flat dataset row per property, agent, or location suggestion** — sortable, filterable, CSV / Excel / JSON exportable.
- Columns: `Mode`, `Input Given`, `ID`, `Title` (address / agent name), `Deal`, `Property Type`, `Status`, `Price`, `Beds`, `Baths`, `Sq Ft`, `Lot Acres`, `Year Built`, `City`, `State`, `ZIP`, `Latitude`, `Longitude`, `HOA`, `Description`, `Agent`, `Agent Phone`, `Agent Email`, `Office`, `License`, `Active Listings`, `Sold Count`, `Rating`, `Photos`, `Cover Photo`, `Listing URL`.
- The complete upstream JSON for each row is kept in the `Raw` column for power users.

### Inputs

- Each section is independent — fill only the ones you need; multiple inputs per section, one per line.
- The Search filters (deal type, property type, price / beds / baths ranges, sort, pages, results-per-page) apply to every location, ZIP and coordinate search.
- **Coordinates** entries use the format `latitude,longitude` or `latitude,longitude,radiusMiles`, e.g. `30.267,-97.743,3` (3 miles around downtown Austin).
- Range filters use `min:X,max:Y` (either half optional), e.g. price `min:300000,max:900000`, beds `min:3`.

### Pricing

- Pay per result: **$3 per 1,000 dataset items** — the same rate on every Apify plan tier.
- Apify start fee: $0.00005 per run.

### Notes

- Homes.com serves **40 listings per page** — raise *Pages per search* to fetch more.
- Deal type is **For Sale**, **For Rent** or **Sold**.
- Prices are in **USD ($)**; areas in square feet / acres.
- Property details are **enriched** — the description, listing date, public records, HOA, highlights, full feature list and open houses are merged in from multiple homes.com sources.

### Errors

- Failures land in the dataset as rows with `Mode = "ERROR"` and the upstream message in `Title` — nothing is silently dropped.

# Actor input Schema

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

Auto-detects each entry and calls the right endpoint:
• A homes.com property key (e.g. `g71pgh8bn398t`) → `/details/byid`
• A `https://www.homes.com/property/.../<key>/` URL → `/details/byurl`

Each row = one fully enriched property record: price, beds, baths, square feet, lot size, year built, the full description and its "as of" date, HOA fee, public records (zoning, subdivision, county, parcel, MLS#), highlights, the complete feature list, open houses, listing agent + phone, and every photo. Pull a key from any Search or Agent-listings result.

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

Auto-detects each entry and routes to the right `/search/*` endpoint:
• A homes.com results URL, e.g. `https://www.homes.com/austin-tx/` → `/search/byurl`
• A 5-digit ZIP code, e.g. `78735` → `/search/byzip`
• Anything else (city / state / neighborhood, e.g. `Austin, TX`) → `/search/bylocation`

The filters below apply to every location and ZIP query. Each hit returns one row per listing.

## `coordinate_inputs` (type: `array`):

Radius search around a point via `/search/bycoordinates`. One point per line as `latitude,longitude` or `latitude,longitude,radiusMiles` (radius in MILES, default 5). Example: `30.267,-97.743,3` searches 3 miles around downtown Austin. The filters below also apply. One row per listing.

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

Listing status to search for. Applies to every Search and Coordinates query.

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

Restrict results to a property type. Leave as Any for all types.

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

Format: `min:300000,max:900000` — or just `min:300000` / `max:900000`. For rentals this filters the monthly price.

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

Number of bedrooms, e.g. `min:3` or `min:2,max:4`.

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

Number of bathrooms, e.g. `min:2` or `min:2,max:3` (half-baths allowed).

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

Result ordering for the /search routes. Some options only apply to certain Search types: Open house is For sale only; Price reduced, Square feet, Bedrooms and Bathrooms are not supported for For rent.

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

How many result pages to fetch for each location / ZIP / coordinate / URL search (~40 listings per page).

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

Listings to return per page for every search (1–40; homes.com serves 40 per page).

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

Resolve a city / state / neighborhood / ZIP to the homes.com place suggestions used by Search, via `/autocomplete`. Each suggestion = one row (name, geo key, type, city/state/county, coordinates).

## `agent_search_inputs` (type: `array`):

Find real-estate agents by name via `/agent/search`. Each match = one row (name, agent key, company, profile URL). Use a returned key in the Agent details box below for the full profile.

## `agent_detail_inputs` (type: `array`):

Full agent profile via `/agent/details`. Auto-detects each entry:
• An agent key (e.g. `w9enbmj`) → resolved by id
• A `https://www.homes.com/real-estate-agents/.../<key>/` URL → resolved by url

Each row = office, city/state, phone, email, license, bio, photo, active-listing count, sold count and rating when present.

## Actor input object example

```json
{
  "property_inputs": [
    "g71pgh8bn398t",
    "https://www.homes.com/property/1118-spur-st-austin-tx-unit-d/y9rhh9k8bg9xc/"
  ],
  "search_inputs": [
    "Austin, TX"
  ],
  "coordinate_inputs": [],
  "searchType": "For_Sale",
  "propertyType": "",
  "priceRange": "",
  "bedsRange": "",
  "bathsRange": "",
  "sortOrder": "Recommended",
  "pages": 1,
  "resultCount": 20,
  "autocomplete_inputs": [],
  "agent_search_inputs": [],
  "agent_detail_inputs": []
}
```

# 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": [
        "g71pgh8bn398t",
        "https://www.homes.com/property/1118-spur-st-austin-tx-unit-d/y9rhh9k8bg9xc/"
    ],
    "search_inputs": [
        "Austin, TX"
    ],
    "coordinate_inputs": [],
    "autocomplete_inputs": [],
    "agent_search_inputs": [],
    "agent_detail_inputs": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("one-api/homes-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": [
        "g71pgh8bn398t",
        "https://www.homes.com/property/1118-spur-st-austin-tx-unit-d/y9rhh9k8bg9xc/",
    ],
    "search_inputs": ["Austin, TX"],
    "coordinate_inputs": [],
    "autocomplete_inputs": [],
    "agent_search_inputs": [],
    "agent_detail_inputs": [],
}

# Run the Actor and wait for it to finish
run = client.actor("one-api/homes-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": [
    "g71pgh8bn398t",
    "https://www.homes.com/property/1118-spur-st-austin-tx-unit-d/y9rhh9k8bg9xc/"
  ],
  "search_inputs": [
    "Austin, TX"
  ],
  "coordinate_inputs": [],
  "autocomplete_inputs": [],
  "agent_search_inputs": [],
  "agent_detail_inputs": []
}' |
apify call one-api/homes-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,one-api/homes-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/8VoXmcHKcEmaVMhHG/builds/aFDUzLYj0An2oLToP/openapi.json
