# Apartments.com Scraper - Rentals, Rents & Contacts (`s-r/apartments-scraper`) Actor

Scrape rental listings from apartments.com. Property name, full address, beds, starting rent, amenities, photo counts and the leasing phone number, with optional coordinates and rent ranges per building.

- **URL**: https://apify.com/s-r/apartments-scraper.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Apartments.com Scraper

Rental listings from apartments.com as a clean table. Give it a city and get
back every property on the market there: the building name, the full address,
the bed range, the starting rent, the amenities, how many photos the listing
has, and the leasing office's phone number.

It handles two ways of asking. **Locations** takes apartments.com's own slug,
like `new-york-ny` or `austin-tx`, and walks the result pages for you. It also
takes a full search URL, so if you have already narrowed a search in the
browser to one bedroom under $2,000 with parking, paste that URL and the actor
respects every filter in it. **Specific properties** takes property page links
instead, which is the mode for re-checking the same buildings on a schedule.

### Rent is reported the way the site reports it

This matters more than it sounds. Most listings show a rent like `$5,074+`,
which means "from", because the building has several floor plans at different
prices. Flattening that to `5074` turns a starting price into a price, and
nobody notices until a rent comparison is quietly wrong.

So every row carries three fields instead of one:

- `rent_text` is exactly what the site displays, plus sign and all
- `rent_from` is that number, for sorting and filtering
- `rent_is_from` is true when the displayed figure is a starting price

Turn on **Follow each listing** and you also get `rent_min` and `rent_max`, the
real range across that building's units, plus its coordinates and the names of
the floor plans on offer. That costs one extra request per listing, so a
hundred-listing run takes noticeably longer, but it is the difference between
"from $5,074" and "$5,074 to $6,483".

### What a row looks like

- `listing_id`, `url`, `name` — the property
- `address`, `street_address`, `country_code` — where it is
- `beds` — the bed range as displayed, `Studio` through `4 Beds`
- `rent_text`, `rent_from`, `rent_is_from`
- `amenities` — what the card advertises, such as pets allowed, pool, in-unit laundry
- `has_specials` — whether a move-in offer is being advertised
- `phone` — the leasing number
- `photo_count` — how many photos the listing carries
- `is_featured` — whether apartments.com is promoting the listing
- `search`, `search_page`, `position` — where in the run it came from

With **Follow each listing** on, each row also gains `latitude`, `longitude`,
`rent_min`, `rent_max`, `unit_models`, `unit_count`, and two flags saying
whether that property publishes a fees section and a nearby-schools section.

Some fields are legitimately empty. A card with no advertised amenities has
none, and a small handful of promoted placards carry no price at all. Those
come back null rather than being filled in with a guess.

### Run sizes and paging

Result pages hold forty listings each and a busy city has well over a hundred
pages, so two inputs keep a run bounded. **Maximum listings** is the overall
cap across every location. **Maximum pages per location** is the safety rail
that stops one enormous city from consuming the whole run.

Because listings arrive forty at a time, asking for 50 fetches two pages and
trims. Asking for 45 costs exactly the same as asking for 80.

A hundred listings without following detail pages takes a few seconds. The same
run with **Follow each listing** on takes a few minutes, because it is a
hundred more page loads. Default memory of 1 GB is comfortable either way.

### When something cannot be read

A location or page that fails becomes an entry in the `errors` record rather
than a missing row:

| Code | Meaning |
|---|---|
| `bad_input` | No location or property URL was supplied |
| `no_results` | The location was read and genuinely has no listings |
| `fetch_failed` | A result page could not be read after several attempts |
| `detail_failed` | A property page could not be read |

`no_results` and `fetch_failed` are deliberately different. An empty city and a
page that would not load look identical if you only count rows, and telling
them apart is the difference between "nothing to rent there" and "we do not
know".

### A note on reliability

Route access to this site is narrow, and it can change without warning. If a
run suddenly returns `fetch_failed` across the board where it worked last week,
that is what has happened; it is not a bad location or a transient error.
Re-run once, and if it persists, say so and it will be looked at rather than
patched around.

### Related actors

For the UK rental and sale market, use **Rightmove Scraper**. For US listings
for sale rather than rent, use **Zillow Scraper** or **Redfin Scraper**.

# Actor input Schema

## `search` (type: `array`):

One per line. Use apartments.com's own slug, for example new-york-ny or austin-tx, or paste a full search URL with filters already applied.

## `propertyUrls` (type: `array`):

Property page links, one per line. Use this to re-check a set of buildings rather than search a city.

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

Across all locations. Result pages hold forty listings each, so this trims the last page rather than shortening it.

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

A busy city has well over a hundred pages, so this is the safety rail on a large run.

## `includeDetail` (type: `boolean`):

Open every property page for coordinates, the rent range and the unit models. One extra request per listing, so runs take noticeably longer.

## Actor input object example

```json
{
  "search": [
    "new-york-ny",
    "https://www.apartments.com/austin-tx/1-bedrooms/"
  ],
  "propertyUrls": [
    "https://www.apartments.com/10-halletts-point-astoria-ny/1j2c5h6/"
  ],
  "maxItems": 100,
  "maxPages": 10,
  "includeDetail": false
}
```

# Actor output Schema

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

One row per rental listing.

## `summary` (type: `string`):

Locations walked, listings returned, and how many carried a rent and amenities.

## `errors` (type: `string`):

Locations or pages that could not be read, with the reason.

# 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 = {
    "search": [
        "new-york-ny"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/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 = { "search": ["new-york-ny"] }

# Run the Actor and wait for it to finish
run = client.actor("s-r/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 '{
  "search": [
    "new-york-ny"
  ]
}' |
apify call s-r/apartments-scraper --silent --output-dataset

```

## MCP server setup

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