# Apartments.com API & Scraper — US Rentals + Walk Score (`sian.agency/apartments-com-property-scraper`) Actor

🏢 The Apartments.com API + Apartments.com scraper for PropTech. Search US rentals by location, zip, coordinates, or URL. Built-in market-rent KPIs (median, $/bed, distribution) + walk score API, schools, pet policy in one event.

- **URL**: https://apify.com/sian.agency/apartments-com-property-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 property extracteds

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 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 API & Scraper — US Rentals + Walk Score 🚀

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![SIÁN Realtor Property Scraper](https://img.shields.io/badge/SI%C3%81N-Realtor%20Property%20Scraper-D92228)](https://apify.com/sian.agency/realtor-property-scraper?fpr=sian) [![SIÁN Redfin Property Scraper](https://img.shields.io/badge/SI%C3%81N-Redfin%20Property%20Scraper-A02021)](https://apify.com/sian.agency/redfin-property-scraper?fpr=sian) [![SIÁN Zillow Property Scraper](https://img.shields.io/badge/SI%C3%81N-Zillow%20Property%20Scraper-1F4E79)](https://apify.com/sian.agency/zillow-property-scraper?fpr=sian)

#### 🎉 The Apartments.com API your PropTech stack has been missing — 45+ fields per listing, median rent + $/bed + walk score API built into every run
##### Apartments.com scraper for PropTech engineers, multifamily underwriters, and rental-concierge tools across all 50 US states.

**Independent tool — not affiliated with CoStar Group, Inc.** Apartments.com® is a registered trademark of CoStar Group, Inc.; this actor is an independent data utility that reads only publicly published listings.

---

### 📋 Overview

**Need apartments.com data without building (and maintaining) your own apartments.com scraper?** This is the only apartments.com API on the Apify store that ships **built-in market-rent KPIs and a walk score API in a single run**.

**Why thousands of rental-data professionals choose us:**
- ✅ **50-state US coverage**: every active rental on apartments.com, including studios, multi-family, and corporate units
- ⚡ **Direct apartments.com API** — not a fragile browser scraper. **45+ structured fields per listing**, faster runs, no anti-bot risk
- 🎯 **Built-in market-rent KPIs**: median rent, $/bed, and rent-distribution percentiles per query — no post-processing required
- 💰 **Best price on the market**: 6-tier auto-ladder from $0.005 BRONZE down to $0.003 GOLD per listing. Fully enriched (walk score + schools + pet policy + lease terms) charged as **ONE** event — competitors split this into 5–7 separate charges
- 💎 **BigInt-safe JSON** — `amenitiesBitmap` and 64-bit identifiers preserved as strings (most apartments.com data extractors silently corrupt these)
- ✨ **NEW**: One-click enrichment bundle bundling walk score API, schools, pet policy, lease terms, rental costs, and per-unit availability in a single parallel fetch

---

### ✨ Features

- 🔍 **5 search modes** — by location, by zip, by coordinates (radial), by URL, or bulk-location batches (PAID)
- 🏷️ **45+ structured fields per listing** — pricing range, bed range, manager, contact, geo, media, market signals
- 📊 **Built-in Market Rent KPIs** — median midpoint rent, median rent per bed, distribution percentiles, inventory tally by city and zip
- ⭐ **One-click enrichment bundle** — walk score API + transit + bike + schools + pet policy + lease terms + rental costs in parallel, charged as ONE `enrichment-fetched` event
- 🗺️ **Radial search** — lat/lng + miles radius for hyperlocal rent comps
- 📋 **Bulk-location mode** — batch dozens of US markets in one PAID run
- 🎨 **HTML KPI report** — KPI cards, distribution stats, methodology block saved to key-value store, ready for client decks
- 🛡️ **BigInt precision** — apartments.com data preserved 1:1 (no silent integer corruption)
- 💸 **Pay-per-result** — zero charge for empty runs or failed lookups

---

### 🎬 Quick Start

Run the actor with one curl command — get apartments.com data flowing into your stack in under 60 seconds.

```bash
curl -X POST https://api.apify.com/v2/acts/sian.agency~apartments-com-property-scraper/runs?token=YOUR_TOKEN \
  -H 'Content-Type: application/json' \
  -d '{"searchMode": "byZip", "zip": "10001", "maxResults": 25}'
````

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Pick a search mode

Choose **By Location** for free-text city/neighborhood, **By Zip** for precise 5-digit US targeting, **By Coordinates** for hyperlocal radial search, or **By URL** to paste any apartments.com page.

#### Step 2: (Optional) Toggle the enrichment bundle

PAID-tier users: flip **Include enrichment bundle** ON to add walk score, schools, pet policy, lease terms, and rental costs to every listing — charged as ONE event per listing.

#### Step 3: Run it

Hit **Start**. You'll see real-time progress, a structured JSON dataset, and an HTML KPI report saved to the key-value store the moment the run finishes.

**That's it! In under 2 minutes, you'll have:**

- A clean dataset of fully structured apartments.com rental listings
- Market-rent KPIs (median, $/bed, distribution) per query
- A shareable HTML report ready for client decks

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `searchMode` | string | Yes | `byLocation`, `byZip`, `byCoordinates`, `byUrl`, or `bulkLocations` |
| `maxResults` | integer | No | Hard cap per query (1–1000; FREE auto-capped at 25). Default `100` |
| `location` | string | No\* | Free-text city/neighborhood — used in `byLocation` mode |
| `zip` | string | No\* | 5-digit US zip — used in `byZip` mode |
| `latitude` | number | No\* | Center latitude — used in `byCoordinates` mode |
| `longitude` | number | No\* | Center longitude — used in `byCoordinates` mode |
| `radius` | integer | No | Search radius in miles (1–50). Default `5` |
| `url` | string | No\* | apartments.com region/city URL — used in `byUrl` mode |
| `locations` | array | No\* | Array of US locations — used in `bulkLocations` mode (PAID) |
| `includeEnrichment` | boolean | No | Toggle the 7-fetch enrichment bundle. Default `false` |

\*Required for the matching search mode.

**Example:**

```json
{
  "searchMode": "byZip",
  "zip": "10001",
  "maxResults": 25,
  "includeEnrichment": false
}
```

**Bulk Processing (PAID):**

```json
{
  "searchMode": "bulkLocations",
  "locations": ["Brooklyn, NY", "Austin, TX", "Seattle, WA"],
  "maxResults": 50,
  "includeEnrichment": true
}
```

***

### 📤 Output

Results are saved to the Apify dataset with **45+ structured fields** including:

| Field | Type | Description |
|-------|------|-------------|
| `listingKey` | string | Unique apartments.com property identifier |
| `listingTitle` | string | Building/property name or formatted address |
| `address` | object | Street, city, state, postal code, full one-line address |
| `pricing` | object | `rentRange` + parsed `rentMin`/`rentMax`/`rentMidpoint` |
| `specs` | object | `bedRange`, parsed `bedsMin`/`bedsMax`, `isMultifamily`, `isFurnished` |
| `location` | object | Latitude + longitude (decimal degrees) |
| `market` | object | `availabilityText`, `hasAvailabilities`, `rentDeals`, building rating |
| `media` | object | Primary image, multimedia URL, 3D scan URL |
| `propertyManager` | object | Manager name + apartments.com company ID |
| `contact` | object | Phone number + lead-email availability flag |
| `amenitiesBitmap` | string | BigInt-encoded amenity flags (string-preserved) |
| `details` | object | *(Enriched, PAID)* description + amenities + fees + leaseTerms + photos |
| `info` | object | *(Enriched, PAID)* yearBuilt, unitCount, storyCount, apartmentStyle |
| `walkScores` | object | *(Enriched, PAID)* walk score API + transit + bike scores |
| `schools` | array | *(Enriched, PAID)* Nearby schools grouped by category |
| `petPolicies` | array | *(Enriched, PAID)* Per-pet-type fees, deposits, weight limits |
| `rentalCosts` | object | *(Enriched, PAID)* Per-unit rent breakdown + monthly costs |
| `availabilities` | array | *(Enriched, PAID)* Per-floorplan availability detail |
| `scrapedAt` | string | ISO timestamp of when this record was extracted |

**Example:**

```json
{
  "listingKey": "0smfmv0",
  "listingTitle": "The Eugene",
  "address": {
    "street": "435 W 31st St",
    "city": "New York",
    "state": "NY",
    "postalCode": "10001",
    "full": "435 W 31st St, New York, NY 10001"
  },
  "pricing": { "rentRange": "$4,500 - 10,000", "rentMin": 4500, "rentMax": 10000, "rentMidpoint": 7250 },
  "specs": { "bedRange": "Studio - 1 Bed", "bedsMin": 0, "bedsMax": 1, "isMultifamily": true },
  "location": { "lat": 40.7517, "lng": -73.9985 },
  "amenitiesBitmap": "1660381037712900511",
  "walkScores": { "walk": 98, "transit": 100, "bike": 89 },
  "scrapedAt": "2026-05-15T09:30:00.000Z"
}
```

***

### 💼 Use Cases & Examples

#### 1. PropTech rental-tool builders

**Stop maintaining a fragile apartments.com scraper — use the apartments.com API directly.**

**Input:** Target markets as `locations` (bulk mode).
**Output:** Fully structured listings + walk score API + schools — ready to power a tenant-search product.
**Use:** Drop into your backend; replace 800 lines of scraping code with one webhook call.

#### 2. Multifamily underwriting & rent-comp research

**Pull median rent and $/bed for any zip in seconds.**

**Input:** `byZip` for each comp zip in your underwriting model.
**Output:** Inventory count, median midpoint rent, and distribution percentiles per zip.
**Use:** Drop the KPI block into your DCF model; sanity-check sponsor rent assumptions.

#### 3. Rental concierges prospecting buildings

**One run returns contact, manager, amenities, pet policy, lease terms, and walk score.**

**Input:** `byCoordinates` for a 2-mile radius around your client's office.
**Output:** Every active building with manager contact, lead-email flag, pet rules, and lease terms.
**Use:** Build curated shortlists for relocation clients in under 30 minutes.

#### 4. Multi-market portfolio analysts

**Compare 30 US markets in one PAID run.**

**Input:** `bulkLocations` with 30 city/state pairs.
**Output:** Side-by-side market KPIs — median rent, $/bed, inventory by zip.
**Use:** Identify under-priced markets for cross-market portfolio expansion.

#### 5. Tenant-facing apps and AI chatbots

**Get apartments.com data into your LLM context window in clean JSON, not HTML.**

**Input:** User query → `byLocation` or `byZip` lookup.
**Output:** Clean structured JSON, ready to feed an LLM or display in a chat UI.
**Use:** Power "find me a 2-bed under $3000 in Brooklyn" conversational search.

#### 6. Academic researchers studying rental markets

**Reliable, structured apartments.com data — without writing a scraper.**

**Input:** Time-series runs across the same zips, scheduled weekly.
**Output:** Longitudinal rent dataset with timestamps and market signals.
**Use:** Track rent growth, vacancy proxies, and inventory shifts over time.

#### 7. Real-estate market-intelligence agencies

**Deliver client reports with apartments.com data underneath.**

**Input:** Client market list as bulk locations.
**Output:** HTML KPI report saved to key-value store + structured dataset.
**Use:** White-label the HTML report or pipe the dataset into your client's BI stack.

***

### 🔗 Integration Examples

#### JavaScript / Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/apartments-com-property-scraper').call({
  searchMode: 'byZip',
  zip: '10001',
  maxResults: 25,
  includeEnrichment: true
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} listings — median rent:`, items[0].pricing.rentMidpoint);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/apartments-com-property-scraper').call(
    run_input={
        'searchMode': 'byLocation',
        'location': 'Austin, TX',
        'maxResults': 100,
        'includeEnrichment': False
    }
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item['listingTitle'], item['pricing']['rentMidpoint'])
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~apartments-com-property-scraper/runs?token=YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"searchMode": "byLocation", "location": "Brooklyn, NY", "includeEnrichment": true}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: Schedule (weekly market refresh) or webhook (on-demand client request)
2. **HTTP Request**: Call the actor's run endpoint with your search input
3. **Process**: Parse JSON results — every listing has a consistent 45+ field schema
4. **Action**: Save to Airtable / Google Sheets, ping Slack with KPI summary, or pipe into your BI

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **Up to 25 listings per run** — full feature access, same 45+ field schema as PAID
- No credit card required
- Perfect for testing, prototyping, and small validation projects

#### PAID Tier (Production Ready)

- **Unlimited listings per run** (up to your `maxResults` cap)
- **Enrichment bundle unlocked** — walk score API, schools, pet policy, lease terms in one charge
- **Bulk-location mode** for multi-market batches
- **Pay-per-result** — zero charge for failed lookups or empty results

#### 6-Tier Pricing Ladder (auto-scales with your monthly volume)

| Event | FREE | BRONZE | SILVER | GOLD | PLATINUM | DIAMOND |
|---|---|---|---|---|---|---|
| Run start (one-time) | $0.12 | $0.012 | $0.012 | $0.012 | $0.012 | $0.012 |
| **Per listing extracted** (headline) | $0.030 | $0.005 | $0.004 | $0.003 | $0.003 | $0.003 |
| Enrichment bundle (per listing) | $0.030 | $0.008 | $0.006 | $0.005 | $0.004 | $0.004 |

💰 **Best price on the market** — at GOLD tier and up, you pay **$0.008 per fully enriched listing** (rent + walk score + schools + pet policy + lease terms + rental costs). Competitors charge $0.005+ for raw listings alone and fragment enrichment into 5–7 separate $0.001+ events.

🔗 [View current pricing](https://apify.com/sian.agency/apartments-com-property-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: What does the apartments.com API actually return?**
A: 45+ structured fields per listing — pricing range, bed range, address, manager, contact, geo, media, market signals — plus an optional enrichment bundle (walk score API + schools + pet policy + lease terms + rental costs). All in clean JSON.

**Q: How is this different from other apartments.com scrapers on Apify?**
A: We're the only one that ships **built-in market-rent KPIs** (median, $/bed, distribution per city/zip) and bundles walk score + schools + pet policy into a **single enrichment event**. Competitors fragment those into 5–7 separate charges and never compute KPIs. We also BigInt-preserve `amenitiesBitmap` so your downstream stack gets 1:1 fidelity.

**Q: How many listings can I process?**
A: FREE tier: 25 listings per run. PAID tier: unlimited (subject to your `maxResults` cap; default 100, max 1000).

**Q: Does this work with private or login-walled apartments.com data?**
A: No — only publicly accessible apartments.com data is supported. Personal contact details appear only when the listing itself publishes them.

**Q: What output formats are available?**
A: JSON (default), CSV, Excel — export directly from the Apify dataset console. The HTML KPI report is saved separately to the key-value store.

**Q: Can I get the walk score API without the rest of the enrichment bundle?**
A: Today, walk score is part of the bundled `enrichment-fetched` event (alongside schools, pet policy, lease terms, and rental costs). Granular per-fetch toggles are on the v0.2 roadmap — open an issue with your use case.

**Q: How fresh is apartments.com data?**
A: Listings are fetched live at run time. Every record carries a `scrapedAt` ISO timestamp so you know exactly when the data was current.

**Q: Is this a rental property API I can build a product on?**
A: Yes — stable schema, pay-per-result pricing, 50-state coverage, direct API. PropTech teams, rental concierges, and multifamily underwriters use it in production.

***

### 🐛 Troubleshooting

**Search returned 0 listings**

- For `byLocation`: use a more specific form like `"Brooklyn, NY"` instead of just `"Brooklyn"`
- For `byZip`: verify the zip is 5 digits and a valid US zip
- For `byCoordinates`: increase the `radius` (try 10 miles)

**Enrichment fields are empty on FREE tier**

- The enrichment bundle is PAID-only. Upgrade your Apify plan or set `includeEnrichment: false`.

**Walk score / schools missing on some listings**

- Apartments.com does not publish walk score or school data for every listing. The actor still returns the listing record; the optional enrichment fields are simply absent for those rows.

**Bulk-location mode says "PAID tier required"**

- Bulk processing requires the PAID tier. Use `byLocation` or `byZip` in single-mode for FREE-tier runs.

**`amenitiesBitmap` looks like a string instead of a number**

- That's intentional — `amenitiesBitmap` is a 64-bit unsigned integer that loses precision when parsed as a JS `Number`. We preserve it as a string for 1:1 fidelity. Parse with `BigInt()` if you need numeric ops.

***

### ⚖️ Trademarks & Compliance

**Independent tool — not affiliated with CoStar Group, Inc.** Apartments.com® is a registered trademark of CoStar Group, Inc. We use the name only to identify the public data source this independent tool reads from. There is no affiliation, endorsement, or business relationship.

***

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

***

### 🤝 Support

[![Telegram Support](https://img.shields.io/badge/Telegram-Support%20Group-0088cc?logo=telegram)](https://t.me/+vyh1sRE08sAxMGRi)

**Join our active support community**

- For issues or questions, open an issue in the actor's repository
- Check [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Actor input Schema

## `searchMode` (type: `string`):

How to find rental listings.

• **byLocation** — free-text city/neighborhood (e.g. "Brooklyn, NY")
• **byZip** — 5-digit US zip code (e.g. "10001")
• **byCoordinates** — lat/lng + radius (miles)
• **byUrl** — paste any apartments.com region or city URL
• **bulkLocations** — batch dozens of locations in one run (PAID)

## `maxResults` (type: `integer`):

Hard cap on listings returned per query. Apartments.com returns 50 results per page; the actor auto-paginates up to this cap. FREE tier is always capped at 25 listings per run.

## `location` (type: `string`):

Free-text US city or neighborhood. Examples:
• "Brooklyn, NY"
• "Capitol Hill, Seattle"
• "Austin, TX"
• "Williamsburg"

The API will fuzzy-match — your run summary will echo the matched location.

## `zip` (type: `string`):

5-digit US zip code (e.g. "10001", "78704").

## `latitude` (type: `number`):

Center latitude for a radial search.

## `longitude` (type: `number`):

Center longitude for a radial search.

## `radius` (type: `integer`):

Search radius in miles around the lat/lng center (1-50).

## `url` (type: `string`):

Paste any apartments.com region, city, or neighborhood URL. Examples:
• https://www.apartments.com/new-york-ny/
• https://www.apartments.com/brooklyn-ny/
• https://www.apartments.com/austin-tx/

## `locations` (type: `array`):

Array of US location strings (one search per item). PAID tier only. Examples: \["Brooklyn, NY", "Austin, TX", "Seattle, WA"].

## `includeEnrichment` (type: `boolean`):

When ON, fetches the full enrichment bundle for each listing in parallel: details (description + amenities + fees + lease terms + photos), info (year built, unit count, story count), walk/transit/bike scores, schools, pet policy, rental costs, and unit-level availabilities. 7 extra API calls per listing run in parallel. Adds one enrichment-fetched charge per listing where at least one enrichment fetch succeeded. Disabled on FREE tier.

## Actor input object example

```json
{
  "searchMode": "byLocation",
  "maxResults": 100,
  "location": "Brooklyn, NY",
  "zip": "10001",
  "latitude": 40.7481,
  "longitude": -73.9886,
  "radius": 5,
  "url": "https://www.apartments.com/new-york-ny/",
  "includeEnrichment": false
}
```

# Actor output Schema

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

Apartments.com rental listings with parsed pricing, beds, and optional enrichment.

## `htmlReport` (type: `string`):

Run summary with KPIs, distribution stats, and per-query totals.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/apartments-com-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/apartments-com-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 '{}' |
apify call sian.agency/apartments-com-property-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Apartments.com API & Scraper — US Rentals + Walk Score",
        "description": "🏢 The Apartments.com API + Apartments.com scraper for PropTech. Search US rentals by location, zip, coordinates, or URL. Built-in market-rent KPIs (median, $/bed, distribution) + walk score API, schools, pet policy in one event.",
        "version": "1.0",
        "x-build-id": "x1jdgli34IhPsemOD"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~apartments-com-property-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-apartments-com-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/sian.agency~apartments-com-property-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-apartments-com-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/sian.agency~apartments-com-property-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-apartments-com-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": {
                    "searchMode": {
                        "title": "🧭 Search Mode",
                        "enum": [
                            "byLocation",
                            "byZip",
                            "byCoordinates",
                            "byUrl",
                            "bulkLocations"
                        ],
                        "type": "string",
                        "description": "How to find rental listings.\n\n• **byLocation** — free-text city/neighborhood (e.g. \"Brooklyn, NY\")\n• **byZip** — 5-digit US zip code (e.g. \"10001\")\n• **byCoordinates** — lat/lng + radius (miles)\n• **byUrl** — paste any apartments.com region or city URL\n• **bulkLocations** — batch dozens of locations in one run (PAID)",
                        "default": "byLocation"
                    },
                    "maxResults": {
                        "title": "📊 Max results per query",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Hard cap on listings returned per query. Apartments.com returns 50 results per page; the actor auto-paginates up to this cap. FREE tier is always capped at 25 listings per run.",
                        "default": 100
                    },
                    "location": {
                        "title": "📍 Location  (used when Search Mode = byLocation)",
                        "type": "string",
                        "description": "Free-text US city or neighborhood. Examples:\n• \"Brooklyn, NY\"\n• \"Capitol Hill, Seattle\"\n• \"Austin, TX\"\n• \"Williamsburg\"\n\nThe API will fuzzy-match — your run summary will echo the matched location."
                    },
                    "zip": {
                        "title": "📮 Zip Code  (used when Search Mode = byZip)",
                        "type": "string",
                        "description": "5-digit US zip code (e.g. \"10001\", \"78704\")."
                    },
                    "latitude": {
                        "title": "🗺️ Latitude  (used when Search Mode = byCoordinates)",
                        "minimum": -90,
                        "maximum": 90,
                        "type": "number",
                        "description": "Center latitude for a radial search."
                    },
                    "longitude": {
                        "title": "🗺️ Longitude  (used when Search Mode = byCoordinates)",
                        "minimum": -180,
                        "maximum": 180,
                        "type": "number",
                        "description": "Center longitude for a radial search."
                    },
                    "radius": {
                        "title": "📏 Radius (miles)",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Search radius in miles around the lat/lng center (1-50).",
                        "default": 5
                    },
                    "url": {
                        "title": "🔗 Apartments.com URL  (used when Search Mode = byUrl)",
                        "type": "string",
                        "description": "Paste any apartments.com region, city, or neighborhood URL. Examples:\n• https://www.apartments.com/new-york-ny/\n• https://www.apartments.com/brooklyn-ny/\n• https://www.apartments.com/austin-tx/"
                    },
                    "locations": {
                        "title": "📋 Bulk Locations  (PAID, bulkLocations mode)",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Array of US location strings (one search per item). PAID tier only. Examples: [\"Brooklyn, NY\", \"Austin, TX\", \"Seattle, WA\"].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeEnrichment": {
                        "title": "⭐ Include enrichment bundle (PAID)",
                        "type": "boolean",
                        "description": "When ON, fetches the full enrichment bundle for each listing in parallel: details (description + amenities + fees + lease terms + photos), info (year built, unit count, story count), walk/transit/bike scores, schools, pet policy, rental costs, and unit-level availabilities. 7 extra API calls per listing run in parallel. Adds one enrichment-fetched charge per listing where at least one enrichment fetch succeeded. Disabled on FREE tier.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
