# Apartments.com Property Scraper (`one-api/apartments-property-scraper`) Actor

Scrape Apartments.com rentals. 10 endpoints:
• Property record by listingKey, URL, or street address (auto-detected)
• 6 search modes — location, ZIP, coords, polygon, region ID, or URL (auto-routed)
• Location autocomplete

One row per listing; full upstream JSON in the Raw column.

- **URL**: https://apify.com/one-api/apartments-property-scraper.md
- **Developed by:** [ONE API](https://apify.com/one-api) (community)
- **Categories:** Lead generation, Real estate
- **Stats:** 4 total users, 2 monthly users, 100.0% runs succeeded, 2 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Apartments.com Property Scraper

Scrape Apartments.com rentals — property records, every sub-block, search by 6 different inputs, autocomplete, and rental market trends.

### What it does

- **Property Details** — auto-detects each input as `listingKey`, URL, or address; returns the full record
- **18 sub-blocks per listing** — info, amenities, availabilities, schools, transits, office hours, pet policy, parking policy, lease terms, management, expenses, walkscore, fees, rental costs, similar, reviews, photos, attachments
- **6 search modes** — by location name, ZIP, coordinates, polygon, region ID, or apartments.com URL
- **Autocomplete** — typeahead for cities, neighbourhoods, ZIPs (use the returned `id` as `geographyId` for region search)
- **Rental Market Trends** — state-level (and some city-level) average rent + YoY change

### Output

- One flat dataset row per listing / sub-block / autocomplete suggestion / trends snapshot
- Columns: `Mode`, `Listing Key`, `Name`, `Address`, `City`/`State`/`ZIP`, `Phone`, `Rating`, `Bed Range`, `Rent Range`, `Photo` (cover image), `Listing URL`
- Full upstream JSON kept in `Raw` column for power users

### Inputs

- Each section is independent — fill only the ones you need
- Multiple inputs per section: one per line in the textarea

### Pricing

- Pay per result: `$3 per 1,000` dataset items, every plan tier
- Apify start fee: `$0.00005` per run

### Notes

- Sub-blocks always run for every selected listingKey × every selected block — so 5 keys × 18 blocks = 90 rows
- Search results are capped to ~50 listings per page (apartments.com upstream limit); paginate via the `page` field
- `rental/trends` works state-wide; city support depends on apartments.com coverage

### Errors

- Failures land in the dataset as rows with `Name = "ERROR: ..."` so nothing is silently dropped

# Actor input Schema

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

Auto-detects each entry and calls the right endpoint:
• Plain token (e.g. `33fdtgf`) → `/details/byid`
• `https://www.apartments.com/...` → `/details/byurl`
• Anything with a space (street address) → `/details/byaddress`

Each row = 1 property record (community description, address, rent/bed ranges, rating, phone, photo cover).
## `search_inputs` (type: `array`):

Auto-detects each entry and routes to the right `/search/*` endpoint:
• `https://www.apartments.com/...` → `/search/byurl`
• 5-digit ZIP (e.g. `11201`) → `/search/byzip`
• `lat,lng` or `lat,lng,radius` (e.g. `40.7128,-74.0060,2`) → `/search/bycoordinates`
• `lng lat,lng lat,...` (≥4 vertices) → `/search/bypolygon`
• `geographyId|boundingBox|geographyType` (`|`-delimited; `geographyId` from autocomplete) → `/search/byregionid`
• Anything else (city / state / neighborhood) → `/search/bylocation`

Each hit returns one row per listing. Filters below apply to every search call.
## `autocomplete_inputs` (type: `array`):

Type-ahead lookup for cities, neighbourhoods, ZIPs. Useful for grabbing `geographyId` to feed into `Search by Region ID`.
## `page` (type: `integer`):

Pagination for every `/search/*` call. Default 1.
## `resultCount` (type: `integer`):

How many listings each search call returns. Apartments.com caps around 50.
## `priceRange` (type: `string`):

Filter for every `/search/*`. Format: `min:1500,max:4000`, or just `min:1500` / `max:4000`.
## `bedRange` (type: `string`):

Format: `min:1,max:3`. Studio = `0`.
## `bathRange` (type: `string`):

Format: `min:1,max:2`.
## `squareFeetRange` (type: `string`):

Format: `min:500,max:1500`.
## `propertyType` (type: `string`):

One or more of `Apartment,Condo,House,Townhouse,Room` (comma-separated).
## `petPolicy` (type: `string`):

Filter: `DogsOK`, `CatsOK`, `DogsOK,CatsOK`, or empty.
## `amenities` (type: `string`):

Comma-separated amenity slugs (e.g. `Pool,Gym,InUnitWasher`).
## `sortOrder` (type: `string`):

Result ordering.
## `minRating` (type: `string`):

Filter listings with rating ≥ this number (1-5).
## `radius` (type: `string`):

Used by `/search/bylocation` and `/search/bycoordinates` (when not specified inline).
## `keywords` (type: `string`):

Free-text keyword filter passed to `/search/bylocation` and `/search/bycoordinates`.

## Actor input object example

```json
{
  "property_inputs": [
    "33fdtgf",
    "https://www.apartments.com/cmpnd-9-homestead-jersey-city-nj/1b3d2v5/",
    "9 Homestead Pl, Jersey City, NJ"
  ],
  "search_inputs": [
    "New York, NY",
    "11201",
    "40.7128,-74.0060,2",
    "https://www.apartments.com/new-york-ny/"
  ],
  "autocomplete_inputs": [],
  "page": 1,
  "resultCount": 50,
  "priceRange": "",
  "bedRange": "",
  "bathRange": "",
  "squareFeetRange": "",
  "propertyType": "",
  "petPolicy": "",
  "amenities": "",
  "sortOrder": "Default",
  "minRating": "",
  "radius": "",
  "keywords": ""
}
````

# 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": [
        "33fdtgf",
        "https://www.apartments.com/cmpnd-9-homestead-jersey-city-nj/1b3d2v5/",
        "9 Homestead Pl, Jersey City, NJ"
    ],
    "search_inputs": [
        "New York, NY",
        "11201",
        "40.7128,-74.0060,2",
        "https://www.apartments.com/new-york-ny/"
    ],
    "autocomplete_inputs": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("one-api/apartments-property-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": [
        "33fdtgf",
        "https://www.apartments.com/cmpnd-9-homestead-jersey-city-nj/1b3d2v5/",
        "9 Homestead Pl, Jersey City, NJ",
    ],
    "search_inputs": [
        "New York, NY",
        "11201",
        "40.7128,-74.0060,2",
        "https://www.apartments.com/new-york-ny/",
    ],
    "autocomplete_inputs": [],
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "33fdtgf",
    "https://www.apartments.com/cmpnd-9-homestead-jersey-city-nj/1b3d2v5/",
    "9 Homestead Pl, Jersey City, NJ"
  ],
  "search_inputs": [
    "New York, NY",
    "11201",
    "40.7128,-74.0060,2",
    "https://www.apartments.com/new-york-ny/"
  ],
  "autocomplete_inputs": []
}' |
apify call one-api/apartments-property-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=one-api/apartments-property-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Apartments.com Property Scraper",
        "description": "Scrape Apartments.com rentals. 10 endpoints:\n• Property record by listingKey, URL, or street address (auto-detected)\n• 6 search modes — location, ZIP, coords, polygon, region ID, or URL (auto-routed)\n• Location autocomplete\n\nOne row per listing; full upstream JSON in the Raw column.",
        "version": "1.0",
        "x-build-id": "T8WoGchoJx1cz75qW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/one-api~apartments-property-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-one-api-apartments-property-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/one-api~apartments-property-scraper/runs": {
            "post": {
                "operationId": "runs-sync-one-api-apartments-property-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/one-api~apartments-property-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-one-api-apartments-property-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "property_inputs": {
                        "title": "Property listingKey, Apartments.com URL, or street address (one per line)",
                        "type": "array",
                        "description": "Auto-detects each entry and calls the right endpoint:\n• Plain token (e.g. `33fdtgf`) → `/details/byid`\n• `https://www.apartments.com/...` → `/details/byurl`\n• Anything with a space (street address) → `/details/byaddress`\n\nEach row = 1 property record (community description, address, rent/bed ranges, rating, phone, photo cover).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "search_inputs": {
                        "title": "Search query (one per line)",
                        "type": "array",
                        "description": "Auto-detects each entry and routes to the right `/search/*` endpoint:\n• `https://www.apartments.com/...` → `/search/byurl`\n• 5-digit ZIP (e.g. `11201`) → `/search/byzip`\n• `lat,lng` or `lat,lng,radius` (e.g. `40.7128,-74.0060,2`) → `/search/bycoordinates`\n• `lng lat,lng lat,...` (≥4 vertices) → `/search/bypolygon`\n• `geographyId|boundingBox|geographyType` (`|`-delimited; `geographyId` from autocomplete) → `/search/byregionid`\n• Anything else (city / state / neighborhood) → `/search/bylocation`\n\nEach hit returns one row per listing. Filters below apply to every search call.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "autocomplete_inputs": {
                        "title": "Autocomplete query (one per line)",
                        "type": "array",
                        "description": "Type-ahead lookup for cities, neighbourhoods, ZIPs. Useful for grabbing `geographyId` to feed into `Search by Region ID`.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "page": {
                        "title": "Page number (search filters)",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Pagination for every `/search/*` call. Default 1.",
                        "default": 1
                    },
                    "resultCount": {
                        "title": "Results per page (search filters)",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "How many listings each search call returns. Apartments.com caps around 50.",
                        "default": 50
                    },
                    "priceRange": {
                        "title": "Price range",
                        "type": "string",
                        "description": "Filter for every `/search/*`. Format: `min:1500,max:4000`, or just `min:1500` / `max:4000`.",
                        "default": ""
                    },
                    "bedRange": {
                        "title": "Bed range",
                        "type": "string",
                        "description": "Format: `min:1,max:3`. Studio = `0`.",
                        "default": ""
                    },
                    "bathRange": {
                        "title": "Bath range",
                        "type": "string",
                        "description": "Format: `min:1,max:2`.",
                        "default": ""
                    },
                    "squareFeetRange": {
                        "title": "Square feet range",
                        "type": "string",
                        "description": "Format: `min:500,max:1500`.",
                        "default": ""
                    },
                    "propertyType": {
                        "title": "Property type",
                        "type": "string",
                        "description": "One or more of `Apartment,Condo,House,Townhouse,Room` (comma-separated).",
                        "default": ""
                    },
                    "petPolicy": {
                        "title": "Pet policy",
                        "enum": [
                            "",
                            "DogsOK",
                            "CatsOK",
                            "DogsOK,CatsOK"
                        ],
                        "type": "string",
                        "description": "Filter: `DogsOK`, `CatsOK`, `DogsOK,CatsOK`, or empty.",
                        "default": ""
                    },
                    "amenities": {
                        "title": "Amenities",
                        "type": "string",
                        "description": "Comma-separated amenity slugs (e.g. `Pool,Gym,InUnitWasher`).",
                        "default": ""
                    },
                    "sortOrder": {
                        "title": "Sort order",
                        "enum": [
                            "Default",
                            "PriceLowToHigh",
                            "PriceHighToLow",
                            "Rating",
                            "Newest"
                        ],
                        "type": "string",
                        "description": "Result ordering.",
                        "default": "Default"
                    },
                    "minRating": {
                        "title": "Minimum rating",
                        "type": "string",
                        "description": "Filter listings with rating ≥ this number (1-5).",
                        "default": ""
                    },
                    "radius": {
                        "title": "Radius (miles, location & coord searches)",
                        "type": "string",
                        "description": "Used by `/search/bylocation` and `/search/bycoordinates` (when not specified inline).",
                        "default": ""
                    },
                    "keywords": {
                        "title": "Keywords",
                        "type": "string",
                        "description": "Free-text keyword filter passed to `/search/bylocation` and `/search/bycoordinates`.",
                        "default": ""
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
