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

Scrape rental listings from Apartments.com with search by location, bedroom count, price, property type, and amenities. Extracts rent, address, beds/baths, sqft, amenities, scores, photos, and contact info.

- **URL**: https://apify.com/crawlerbros/apartments-com-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Real estate, Automation, Developer tools
- **Stats:** 3 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 and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Apartments.com Scraper

Extract rental listings from **Apartments.com** — the largest US rental marketplace. Search by city/state with filters for bedrooms, price, property type, pet policy, and amenities, or scrape any Apartments.com URL directly.

### What You Can Scrape

- **Property details**: Name, address, city, state, ZIP, coordinates
- **Pricing**: Monthly rent range (min/max per unit type)
- **Unit specs**: Bedrooms, bathrooms, square footage per unit type
- **Scores**: Walk Score, Transit Score, Bike Score, Sound Score
- **Amenities**: Full list (fitness center, pool, in-unit W/D, etc.)
- **Contact**: Phone number for scheduling tours
- **Media**: Photo URLs (up to 20 per listing)
- **Extras**: Rent specials, availability date, lease terms, deposit info

### Input Configuration

#### Mode: `search` (default)

Provide a **location** and optional filters — the scraper builds the search URL for you.

| Field | Type | Description |
|-------|------|-------------|
| `searchLocation` | String | City and state, e.g. `"New York, NY"` or `"Chicago, IL"` |
| `bedrooms` | Select | Any / Studio / 1-4 / 5+ bedrooms |
| `priceMin` | Integer | Minimum monthly rent (USD) |
| `priceMax` | Integer | Maximum monthly rent (USD) |
| `propertyType` | Select | Any / Apartments / Houses / Condos / Townhomes |
| `petPolicy` | Select | Any / Dogs allowed / Cats allowed / Pets allowed |
| `amenities` | Multi-select | Gym, pool, garage, in-unit W/D, utilities included, etc. |
| `rentSpecials` | Boolean | Only show listings with current move-in deals |
| `scrapeDetails` | Boolean | Visit each listing for full amenities, scores, and photos (default: true) |
| `maxItems` | Integer | Max listings to return (1–500, default 50) |
| `maxPages` | Integer | Max search pages to crawl (1–20, default 5) |

#### Mode: `urls`

Provide **Apartments.com URLs** directly — search result pages or individual listing pages.

| Field | Type | Description |
|-------|------|-------------|
| `startUrls` | Array | List of Apartments.com URLs to scrape |

### Example Input

```json
{
  "mode": "search",
  "searchLocation": "Austin, TX",
  "bedrooms": "2",
  "priceMax": 2500,
  "petPolicy": "dogs",
  "amenities": ["gym", "pool"],
  "maxItems": 100,
  "scrapeDetails": true
}
```

### Example Output

```json
{
  "listingId": "a1b2c3d4e5f6",
  "name": "The Domain Apartments",
  "url": "https://www.apartments.com/the-domain-austin-tx/a1b2c3d4e5f6/",
  "address": "11601 Domain Dr",
  "city": "Austin",
  "state": "TX",
  "zipCode": "78758",
  "country": "US",
  "priceMin": 1650,
  "priceMax": 3200,
  "bedsMin": 1,
  "bedsMax": 3,
  "bathsMin": 1,
  "bathsMax": 2,
  "sqftMin": 650,
  "sqftMax": 1400,
  "propertyType": "apartment",
  "hasRentSpecials": true,
  "phoneNumber": "(512) 555-0123",
  "latitude": 30.4134,
  "longitude": -97.7203,
  "walkScore": 52,
  "transitScore": 38,
  "bikeScore": 45,
  "amenities": ["Fitness Center", "Swimming Pool", "Dog Park", "In-Unit Washer/Dryer", "Garage Parking"],
  "description": "Luxury apartments near The Domain shopping center...",
  "photos": [
    "https://photos.apartments.com/p2/property-exterior.jpg",
    "https://photos.apartments.com/p2/property-pool.jpg"
  ],
  "availabilityDate": "Available Now",
  "leaseTerms": "12 months",
  "scrapedAt": "2026-05-08T11:30:00+00:00"
}
```

### Use Cases

- **Rental market research**: Compare prices and amenities across neighborhoods
- **Relocation planning**: Find pet-friendly or transit-accessible apartments
- **Investment analysis**: Track rent trends across cities
- **Lead generation**: Collect contact info for property management companies
- **Data journalism**: Study housing affordability and availability

### Frequently Asked Questions

**Does this work for all US cities?**
Yes — Apartments.com covers all major US cities and most smaller markets. Canada (e.g. Toronto) is also supported.

**How many listings can I get per run?**
Up to 500 listings per run. Apartments.com displays ~25 listings per search page; with `maxPages=20` you can retrieve ~500 per search. For larger datasets, run multiple searches with different location/filter combinations.

**What's the difference between `scrapeDetails=true` and `scrapeDetails=false`?**
With `scrapeDetails=true` (default), the scraper visits each listing's detail page for the full amenities list, Walk/Transit/Bike scores, contact phone number, description, and photos. With `scrapeDetails=false`, only the data available on the search results page is returned (faster but less complete).

**Why does the scraper require a proxy?**
Apartments.com uses Akamai WAF to block datacenter IP addresses. The actor automatically uses Apify's residential proxy pool to bypass this protection — no configuration needed.

**Are there rate limits?**
The scraper respects polite delays between requests (1–2.5 seconds between pages, 0.5–1.5 seconds between detail pages). This keeps Apartments.com happy and the scraper running reliably.

**Can I scrape specific listing pages?**
Yes — switch to `mode=urls` and provide direct apartment listing URLs (e.g. `https://www.apartments.com/grand-central-apartments-new-york-ny/a1b2c3d4/`).

**What data is NOT available?**

- Historical pricing data (current listings only)
- Resident reviews and ratings (Apartments.com requires login for review details)
- Application/leasing status
- Background check or credit requirements

### Technical Notes

- **Anti-bot**: Akamai WAF protection — requires Apify residential proxy (automatically configured)
- **Parser**: BeautifulSoup HTML parsing (no browser needed)
- **Rate limiting**: Apartments.com limits organic search results to ~700 listings per query; use multiple location searches for larger datasets
- **Data freshness**: All data is scraped live at run time

# Actor input Schema

## `mode` (type: `string`):

How to find listings: 'search' builds a URL from your location and filters; 'urls' scrapes the Apartments.com URLs you provide.

## `searchLocation` (type: `string`):

City and state to search (e.g. 'New York, NY', 'Los Angeles, CA', 'Chicago, IL', 'Austin, TX'). Used only in 'search' mode.

## `bedrooms` (type: `string`):

Filter by bedroom count.

## `priceMin` (type: `integer`):

Minimum monthly rent in USD. Leave unset for no minimum.

## `priceMax` (type: `integer`):

Maximum monthly rent in USD. Leave unset for no maximum.

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

Filter by property type.

## `petPolicy` (type: `string`):

Filter by pet policy.

## `amenities` (type: `array`):

Only show listings with these amenities.

## `rentSpecials` (type: `boolean`):

Only show listings with current rent specials or move-in deals.

## `startUrls` (type: `array`):

Apartments.com search result page URLs or individual listing URLs. Used only in 'urls' mode.

## `scrapeDetails` (type: `boolean`):

Visit each listing's detail page to get full amenities, description, scores, floor plans, and contact info. Slower but richer data.

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

Maximum number of listings to return (1–500).

## `maxPages` (type: `integer`):

Maximum number of search result pages to scrape (1–20). Each page has ~25 listings.

## Actor input object example

```json
{
  "mode": "search",
  "searchLocation": "New York, NY",
  "bedrooms": "any",
  "propertyType": "any",
  "petPolicy": "any",
  "amenities": [],
  "rentSpecials": false,
  "scrapeDetails": true,
  "maxItems": 5,
  "maxPages": 1
}
```

# Actor output Schema

## `listings` (type: `string`):

Dataset containing all scraped Apartments.com rental listings.

# 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 = {
    "mode": "search",
    "searchLocation": "New York, NY",
    "bedrooms": "any",
    "propertyType": "any",
    "petPolicy": "any",
    "amenities": [],
    "rentSpecials": false,
    "scrapeDetails": false,
    "maxItems": 5,
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/apartments-com-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 = {
    "mode": "search",
    "searchLocation": "New York, NY",
    "bedrooms": "any",
    "propertyType": "any",
    "petPolicy": "any",
    "amenities": [],
    "rentSpecials": False,
    "scrapeDetails": False,
    "maxItems": 5,
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/apartments-com-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 '{
  "mode": "search",
  "searchLocation": "New York, NY",
  "bedrooms": "any",
  "propertyType": "any",
  "petPolicy": "any",
  "amenities": [],
  "rentSpecials": false,
  "scrapeDetails": false,
  "maxItems": 5,
  "maxPages": 1
}' |
apify call crawlerbros/apartments-com-scraper --silent --output-dataset

```

## MCP server setup

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