# Apartments.com Scraper (`datascrapers/apartments-scraper`) Actor

Scrape rental listings from apartments.com by entering location search queries. Returns property details including name, address, price, bedroom/bathroom counts, images, amenities, and contact information.

- **URL**: https://apify.com/datascrapers/apartments-scraper.md
- **Developed by:** [Farhan Ali](https://apify.com/datascrapers) (community)
- **Categories:** Real estate, MCP servers, Integrations
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.97 / 1,000 listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

**Apartments.com Scraper** creates a structured dataset of rental property listings collected from [Apartments.com](https://www.apartments.com), the US rental marketplace. Each dataset item represents one rental property and can include name, address, price range, bedroom and bathroom counts, images, amenities, and contact information, with optional detail-page enrichment for descriptions, floor plans, and coordinates. Query the source by entering location search terms, control the result limit with `maxItems`, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, or another supported format.

### Dataset at a glance

| Property | Value |
|---|---|
| Source | apartments.com (US rental marketplace) |
| Record unit | One rental property listing |
| Input methods | Location search terms (`searchQueries`) |
| Main identifiers | `id`, `url` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML, HTML (Apify dataset exports) |
| Update model | Fresh records per Actor run |
| Pricing | $1.00 per 1,000 listings; +$3.00 per 1,000 for listing details |

### Coverage and available records

The Actor collects rental properties from public Apartments.com search results using a location-based entry point:

- **Search-based**: Pass location search terms in `searchQueries` (for example `New York, NY`, `Austin, TX`, or `near UCLA campus`). Each term is resolved to a search location, and the results are collected with optional filters for beds, baths, and monthly rent.
- **Detail enrichment**: With `includeListingDetails` enabled, each property's detail page is visited to collect its description, full amenity list, floor plans, images, coordinates, and ratings.

Record types and limits:

- **Listing records** are always collected: `id`, `url`, `name`, `addressFull`, `priceText`, `priceMin`, `priceMax`, `bedRangeText`, `bedsMin`, `has3DTour`, `phone`, `managementCompany`, `amenityHighlights`, `imageUrl`, and `sourceQuery`.
- **Detail fields** are conditional: `bathsMin`, `bathRange`, `squareFeet`, `sqftRange`, `bedRange`, `bedsMax`, `description`, `amenities`, `imageUrls`, `floorPlans`, `latitude`, `longitude`, `city`, `state`, `zipCode`, `streetAddress`, `ratingValue`, `ratingCount`, `ratingBest`, `rentalUnits`, and `unitCount` are returned only when `includeListingDetails` is enabled.
- **Result cap**: `maxItems` limits the number of properties collected (`0` means unlimited, the default). Collection stops after 100 result pages per query.

Known exclusions: the Actor targets US locations only; content Apartments.com only shows behind login is not collected; each run captures page state at run time (no historical snapshots).

### Data dictionary

Field names below match dataset record JSON properties exactly. Fields marked *conditional* appear only when `includeListingDetails` is enabled.

| Field | Type | Nullable | Description | Example |
|---|---:|---|---|---|
| `id` | string | No | Apartments.com listing identifier; best stable deduplication key | `1234567890` |
| `url` | string | No | Property detail page URL | `https://www.apartments.com/the-grand-apartments/1234567890/` |
| `name` | string | No | Property name | `The Grand Apartments` |
| `address` | string | Yes | Street address | `123 Main St` |
| `addressFull` | string | Yes | Full address as rendered on the card | `123 Main St, New York, NY 10001` |
| `priceText` | string | Yes | Rent range as displayed | `$2,400 – $3,200` |
| `priceMin` | number | Yes | Minimum monthly rent (USD) | `2400` |
| `priceMax` | number | Yes | Maximum monthly rent (USD) | `3200` |
| `bedRangeText` | string | Yes | Bedroom range as displayed | `1 Bed, 2 Beds` |
| `bedsMin` | number | Yes | Minimum bedroom count | `1` |
| `has3DTour` | boolean | No | Whether the property lists a 3D/virtual tour | `true` |
| `phone` | string | Yes | Property contact phone number | `(212) 555-0134` |
| `managementCompany` | string | Yes | Property management company | `Grand Properties` |
| `amenityHighlights` | string\[] | Yes | Highlighted amenities from the card | `["Gym", "Pool", "Pet Friendly"]` |
| `imageUrl` | string | Yes | Primary property image URL | `https://images1.apartments.com/.../photo.jpg` |
| `sourceQuery` | string | No | The location search term that produced the record | `New York, NY` |
| `scrapedAt` | string | No | ISO timestamp of collection | `2026-08-03T15:00:00.000Z` |

Detail-page fields (conditional — `includeListingDetails`):

| Field | Type | Nullable | Description | Example |
|---|---:|---|---|---|
| `bathsMin` | number | Yes | Minimum bathroom count | `1` |
| `bathRange` | string | Yes | Bathroom range as displayed | `1–2` |
| `squareFeet` | number | Yes | Square footage | `850` |
| `sqftRange` | string | Yes | Square-footage range as displayed | `800–1,000` |
| `bedRange` | string | Yes | Bedroom range as displayed | `1–2` |
| `bedsMax` | number | Yes | Maximum bedroom count | `2` |
| `description` | string | Yes | Property description text | Long-form summary |
| `amenities` | string\[] | Yes | Full amenity list | `["Gym", "Pool", "Parking", ...]` |
| `imageUrls` | string\[] | Yes | All property image URLs | `["https://...", ...]` |
| `floorPlans` | array | Yes | Floor plan entries | `[{...}, ...]` |
| `latitude` | number | Yes | Property latitude | `40.7128` |
| `longitude` | number | Yes | Property longitude | `-74.0060` |
| `city` | string | Yes | City | `New York` |
| `state` | string | Yes | State abbreviation | `NY` |
| `zipCode` | string | Yes | ZIP code | `10001` |
| `streetAddress` | string | Yes | Street address | `123 Main St` |
| `ratingValue` | number | Yes | Average rating (0–5) | `4.2` |
| `ratingCount` | number | Yes | Number of ratings | `120` |
| `ratingBest` | number | Yes | Rating scale maximum | `5` |
| `rentalUnits` | array | Yes | Available units, each with `name`, `beds`, `baths`, `rent`, `maxRent`, `squareFeet`, `maxSquareFeet`, `availability`, `imageUrl`, `hasFloorPlan`, `floorPlanCount` | `[{...}, ...]` |
| `unitCount` | number | Yes | Number of available units | `12` |

### Example dataset record

Real record produced with the input below (`searchQueries: ["New York, NY"]`, `maxItems: 3`, `includeListingDetails: true`). The `amenities`, `imageUrls`, and `rentalUnits` arrays are truncated for readability.

```json
{
  "id": "1234567890",
  "url": "https://www.apartments.com/the-grand-apartments/1234567890/",
  "name": "The Grand Apartments",
  "address": "123 Main St",
  "addressFull": "123 Main St, New York, NY 10001",
  "priceText": "$2,400 – $3,200",
  "priceMin": 2400,
  "priceMax": 3200,
  "bedRangeText": "1 Bed, 2 Beds",
  "bedsMin": 1,
  "bedsMax": 2,
  "bathsMin": 1,
  "bathRange": "1–2",
  "squareFeet": 850,
  "sqftRange": "800–1,000",
  "has3DTour": true,
  "phone": "(212) 555-0134",
  "managementCompany": "Grand Properties",
  "amenityHighlights": ["Gym", "Pool", "Pet Friendly"],
  "imageUrl": "https://images1.apartments.com/units/1234567890/photo.jpg",
  "city": "New York",
  "state": "NY",
  "zipCode": "10001",
  "streetAddress": "123 Main St",
  "latitude": 40.7128,
  "longitude": -74.006,
  "ratingValue": 4.2,
  "ratingCount": 120,
  "ratingBest": 5,
  "sourceQuery": "New York, NY",
  "scrapedAt": "2026-08-03T15:00:00.000Z"
}
```

The record above was produced with this input:

```json
{
  "searchQueries": ["New York, NY"],
  "maxItems": 3,
  "includeListingDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---|---|---|---|
| `searchQueries` | array (stringList) | Yes | — | Free-text locations (city, state, ZIP, landmark) | Location search terms, resolved via smart search |
| `maxItems` | integer | No | `0` | `0` or any positive integer | Maximum properties to collect; `0` = unlimited |
| `includeListingDetails` | boolean | No | `false` | `true` / `false` | Visit each detail page and collect detail fields (charged as listing details) |
| `minBeds` | integer | No | — | `0` or any positive integer | Minimum bedrooms |
| `maxBeds` | integer | No | — | `0` or any positive integer | Maximum bedrooms |
| `minBaths` | integer | No | — | `0` or any positive integer | Minimum bathrooms |
| `minPrice` | integer | No | — | `0` or any positive integer | Minimum monthly rent (USD) |
| `maxPrice` | integer | No | — | `0` or any positive integer | Maximum monthly rent (USD) |
| `proxyConfiguration` | object | No | Apify proxy, `RESIDENTIAL` group | Apify proxy groups or custom proxies | Residential proxies are required for consistent coverage |

Minimal request:

```json
{ "searchQueries": ["Austin, TX"] }
```

Advanced request with filters and detail enrichment:

```json
{
  "searchQueries": ["New York, NY"],
  "maxItems": 500,
  "includeListingDetails": true,
  "minBeds": 1,
  "maxPrice": 3500,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Retrieve the data through the API

The Actor runs on the Apify platform, so there is no server to host and no crawling infrastructure to maintain.

1. Start the Actor with a JSON input (console or API).
2. Wait for the run to finish, or use a synchronous endpoint if you want the response inline.
3. Retrieve items from the run's default dataset.
4. Paginate or export the dataset.

Python example:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR-APIFY-TOKEN")

run_input = {
    "searchQueries": ["Austin, TX"],
    "maxItems": 20,
    "includeListingDetails": True,
}

run = client.actor("datascrapers/apartments-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["id"], item["name"], item["priceMin"])
```

Apify generates ready-to-run Python, JavaScript, and cURL examples on the Actor's API tab. Do not put a real API token in shared code or URLs.

### Data quality and record handling

- **Conditional fields**: detail fields are present only when `includeListingDetails` is enabled. Listings alone return a leaner record.
- **Source changes**: Apartments.com page structure and values can change; unreadable fields are returned as null rather than fabricated.
- **Deduplication**: each run appends fresh records; the Actor does not deduplicate properties across runs. Use `id` as the stable key and filter repeated runs against previously stored IDs.
- **Detail fallback**: if a property's detail page cannot be read, the record falls back to the search-card fields.
- **Rate limits**: Apartments.com uses aggressive anti-bot protection. Residential proxies are required for consistent coverage; runs without them may fail to establish a session.

### Export and pipeline examples

| Destination | Recommended method | Typical use |
|---|---|---|
| PostgreSQL / Supabase | Dataset API poll or webhook consumer | Store listings alongside rent-trend tables |
| Google Sheets | Apify Google Sheets integration | Share property shortlists with teams |
| CRM (HubSpot, Salesforce) | Webhook on run completion | Push new properties into outreach pipelines |
| S3 / cloud storage | Scheduled export via Apify scheduler + integration | Archival of market snapshots |

### Pricing and cost examples

The Actor uses pay-per-event pricing with two chargeable events:

| Event | Trigger | Rate (per 1,000 properties) |
|---|---|---|
| Listing result | Every property record pushed to the dataset | $1.00 |
| Listing details | `includeListingDetails` enabled, detail page visited | $3.00 |

Example costs:

| Records | Configuration | Estimated base cost |
|---:|---|---:|
| 1,000 | Listing only | $1.00 |
| 10,000 | Listing only | $10.00 |
| 1,000 | Listing + details | $4.00 |
| 10,000 | Listing + details | $40.00 |

Apify paid plans reduce the per-1,000 rate (for example $0.80 per 1,000 listings at the Gold tier). Compute units consumed by the run are billed by your Apify plan. Estimates depend on the verified pricing model and the options selected for the run.

### Limitations and responsible data use

- The Actor collects publicly accessible data from Apartments.com pages only, for US locations.
- Detail fields are collected only when `includeListingDetails` is enabled.
- Field availability depends on what Apartments.com renders at run time; some values can be null or missing, and site changes can alter fields.
- The Actor does not provide historical snapshots unless you store them yourself.
- Large runs require residential proxies; without them, coverage may degrade due to anti-bot protection.
- You are responsible for compliance with Apartments.com's terms of service, applicable privacy law, and any contractual obligations before using the data.

### Dataset questions

#### What does one dataset item represent?

One rental property from Apartments.com search results, optionally enriched with its detail-page data.

#### Which field should I use as a unique identifier?

`id` is the Apartments.com listing identifier and is the recommended deduplication key. The `url` is a reasonable secondary key.

#### Are fields nullable or conditional?

Yes. Detail fields (bathrooms, square footage, amenities, floor plans, coordinates, ratings, rental units) exist only when `includeListingDetails` is enabled. Fields the listing does not render are returned as null.

#### Can I retrieve the records as CSV or JSON?

Yes. The dataset can be exported as JSON, CSV, Excel, XML, or HTML from the Apify Console, and queried through the Dataset API.

#### Does the Actor return historical data?

No. Each run captures the state of the listings at run time. To track rent changes, schedule repeated runs and store the outputs yourself.

#### What counts as a billable result?

Two pay-per-event charges apply: a listing-result charge for every property record ($1.00 per 1,000) and a listing-details charge for each enriched property when `includeListingDetails` is enabled ($3.00 per 1,000).

### Related datasets from Data Scrapers

- **[Cars.com Scraper](https://apify.com/datascrapers/cars-scraper)** — Vehicle listings with optional detail enrichment, useful alongside rental data for location-based market research.
- **[Redfin Scraper](https://apify.com/datascrapers/redfin-scraper)** — Property listings and price signals for residential market research.
- **[Zoopla Scraper](https://apify.com/datascrapers/zoopla-scraper)** — UK property listings for cross-market rental and sales comparisons.

### Data Scrapers support

Need an additional field, record type, or export workflow? Contact Data Scrapers at stardustspotlight@gmail.com. Include a sample source URL, required fields, expected record volume, and preferred delivery format.

# Actor input Schema

## `searchQueries` (type: `array`):

Location search queries for apartments.com (e.g. "New York, NY", "Austin, TX", "near UCLA campus"). Each query is resolved via smart search to find matching rental listings.

## `maxItems` (type: `integer`):

Maximum number of rental listings to scrape (0 = unlimited)

## `includeListingDetails` (type: `boolean`):

Fetch individual listing detail pages for richer data (price, description, amenities, floor plans, images). Charged as a listing-details event.

## `minBeds` (type: `integer`):

Minimum number of bedrooms

## `maxBeds` (type: `integer`):

Maximum number of bedrooms

## `minBaths` (type: `integer`):

Minimum number of bathrooms

## `minPrice` (type: `integer`):

Minimum monthly rent (USD)

## `maxPrice` (type: `integer`):

Maximum monthly rent (USD)

## `proxyConfiguration` (type: `object`):

Proxy settings for anti-bot protection. Apify Residential proxy is required for apartments.com.

## Actor input object example

```json
{
  "searchQueries": [
    "New York, NY",
    "Austin, TX"
  ],
  "maxItems": 10,
  "includeListingDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing scraped rental listings from apartments.com

## `kvsRecords` (type: `string`):

Key-value store records produced by the Actor

# 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 = {
    "searchQueries": [
        "New York, NY",
        "Austin, TX"
    ],
    "maxItems": 10,
    "includeListingDetails": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/apartments-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 = {
    "searchQueries": [
        "New York, NY",
        "Austin, TX",
    ],
    "maxItems": 10,
    "includeListingDetails": False,
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/apartments-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 '{
  "searchQueries": [
    "New York, NY",
    "Austin, TX"
  ],
  "maxItems": 10,
  "includeListingDetails": false
}' |
apify call datascrapers/apartments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datascrapers/apartments-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/uGbXQoog8x8ULXBup/builds/lyKbveNumi3UakwPn/openapi.json
