# Apartments Scraper API (`shahidirfan/apartments-scraper-api`) Actor

Extract apartment rental listings, property prices, locations, bedrooms, bathrooms, amenities, photos, and listing URLs from Apartments.com. Ideal for real estate data extraction, rental market research, price monitoring, competitor analysis, and property insights.

- **URL**: https://apify.com/shahidirfan/apartments-scraper-api.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Apartments.com Scraper do?

Apartments.com Scraper collects rental listings from Apartments.com by search URL or location. Enter a city, neighborhood, or ZIP code, or paste an Apartments.com search or property URL, and the Actor returns property names, addresses, rent ranges, amenities, photos, and leasing contact details. Results are saved to an Apify dataset that you can download or connect to another workflow. You can run the Actor on a schedule.

The Actor handles normal Apartments.com search pages, filtered pages, page numbers, and individual property pages. It stops when your result limit is reached, when the last page is reached, or when your page limit is reached.

### Why use Apartments.com Scraper?

- Compare asking rents and amenities across neighborhoods without copying listings by hand.
- Build a shortlist with addresses, prices, photos, and phone numbers in one dataset.
- Monitor the same location on a schedule and compare new listings with earlier runs.
- Collect property names, phone numbers, and addresses for leasing outreach and market mapping.
- Export results as JSON, CSV, Excel, or XML, or send them to Google Sheets, webhooks, Make, Zapier, or your own system.

### What data can you extract from Apartments.com?

| Field            | Description                                        |
| ---------------- | -------------------------------------------------- |
| `name`           | Apartment community or property name               |
| `url`            | Direct Apartments.com property URL                 |
| `listing_key`    | Apartments.com listing identifier                  |
| `phone`          | Leasing office phone number                        |
| `description`    | Property description when it differs from the name |
| `street_address` | Street address                                     |
| `city`           | City                                               |
| `state`          | State or region code                               |
| `zip_code`       | ZIP code                                           |
| `country`        | Country code                                       |
| `latitude`       | Latitude coordinate                                |
| `longitude`      | Longitude coordinate                               |
| `property_type`  | Property type reported by the listing              |
| `price_min`      | Lowest advertised monthly rent                     |
| `price_max`      | Highest advertised monthly rent                    |
| `currency`       | Rent currency code                                 |
| `availability`   | Availability status                                |
| `amenities`      | Amenities merged from the listing and media labels |
| `image_url`      | Primary property photo                             |
| `image_urls`     | All property photo URLs                            |
| `source`         | Source website                                     |
| `search_url`     | Search page where the listing was found            |
| `page`           | Search results page number                         |
| `position`       | Position on the search results page                |
| `scraped_at`     | ISO timestamp for the collection                   |

Fields that a listing does not publish are left out of that record instead of being saved as null values. Each row is limited to the fields that listing actually publishes, so not every record has every field.

### How to use Apartments.com Scraper

1. Open the Actor on Apify Store.
2. Enter a location, or paste an Apartments.com search or property URL.
3. Set the result limit and optional filters.
4. Keep the default residential proxy setting for reliable access.
5. Run the Actor.
6. Download the dataset or connect it to your workflow.

### Input Parameters

| Parameter              | Type    | Required | Default           | Description                                                                                                      |
| ---------------------- | ------- | -------- | ----------------- | ---------------------------------------------------------------------------------------------------------------- |
| `startUrl`             | String  | No       | -                 | Apartments.com search or property URL. Takes precedence over `location`.                                         |
| `location`             | String  | No       | `Brooklyn, NY`    | City and state, neighborhood, or ZIP code, for example `Brooklyn, NY`, `Williamsburg, Brooklyn, NY`, or `11201`. |
| `filters`              | Object  | No       | `{}`              | Optional filters for location searches.                                                                          |
| `filters.bedrooms`     | Integer | No       | -                 | `0` for studio, or `1` to `5` bedrooms. Leave empty for any.                                                     |
| `filters.minPrice`     | Integer | No       | -                 | Minimum monthly rent in US dollars.                                                                              |
| `filters.maxPrice`     | Integer | No       | -                 | Maximum monthly rent in US dollars.                                                                              |
| `filters.propertyType` | String  | No       | `apartments`      | One of `apartments`, `condos`, `houses`, or `townhomes`.                                                         |
| `results_wanted`       | Integer | No       | `20`              | Maximum number of listings to save.                                                                              |
| `max_pages`            | Integer | No       | `10`              | Maximum number of search result pages to visit.                                                                  |
| `proxyConfiguration`   | Object  | No       | Apify Residential | Proxy settings. Residential proxies are recommended.                                                             |

#### Search mode priority

`startUrl` wins when both `startUrl` and `location` are supplied. The location value is ignored in that case. When `startUrl` is empty, the Actor builds a search from `location` and `filters`.

`filters` apply to location searches. A full `startUrl` keeps the filters that are already in the URL. For example, a URL for one-bedroom apartments keeps that bedroom filter even if `filters.bedrooms` is empty.

### Output Data

| Field            | Type    | Description                                 |
| ---------------- | ------- | ------------------------------------------- |
| `name`           | String  | Property name                               |
| `url`            | String  | Property URL                                |
| `listing_key`    | String  | Listing identifier                          |
| `phone`          | String  | Leasing office phone                        |
| `description`    | String  | Property description                        |
| `street_address` | String  | Street address                              |
| `city`           | String  | City                                        |
| `state`          | String  | State code                                  |
| `zip_code`       | String  | ZIP code                                    |
| `country`        | String  | Country code                                |
| `latitude`       | Number  | Latitude                                    |
| `longitude`      | Number  | Longitude                                   |
| `property_type`  | String  | Property type                               |
| `price_min`      | Number  | Lowest monthly rent                         |
| `price_max`      | Number  | Highest monthly rent                        |
| `currency`       | String  | Currency code                               |
| `availability`   | String  | Availability status                         |
| `amenities`      | Array   | Amenities from the listing and media labels |
| `image_url`      | String  | Primary photo URL                           |
| `image_urls`     | Array   | All property photo URLs                     |
| `source`         | String  | Source website                              |
| `search_url`     | String  | Search page URL                             |
| `page`           | Integer | Search page number                          |
| `position`       | Integer | Position on the page                        |
| `scraped_at`     | String  | ISO timestamp                               |

### Usage Examples

#### Search by location

Collect the first 50 listings in Brooklyn across two result pages.

```json
{
    "location": "Brooklyn, NY",
    "results_wanted": 50,
    "max_pages": 2
}
```

#### Search by ZIP code

Collect listings in ZIP code 11201.

```json
{
    "location": "11201",
    "results_wanted": 20,
    "max_pages": 1
}
```

#### Start from an Apartments.com URL

Use a filtered or paginated search URL. This example starts on page 2 of the one-bedroom results.

```json
{
    "startUrl": "https://www.apartments.com/brooklyn-ny/1-bedrooms/2/",
    "results_wanted": 40,
    "max_pages": 1
}
```

#### Apply rental filters

Search two-bedroom condos in Austin with rent from $1,500 to $3,000.

```json
{
    "location": "Austin, TX",
    "filters": {
        "bedrooms": 2,
        "minPrice": 1500,
        "maxPrice": 3000,
        "propertyType": "condos"
    },
    "results_wanted": 30,
    "max_pages": 2
}
```

#### Collect one property

Paste a property URL to return that property as a single record.

```json
{
    "startUrl": "https://www.apartments.com/the-fleet-brooklyn-ny/fzq0ycv/",
    "results_wanted": 1
}
```

### Sample Output

```json
{
    "name": "The Vitagraph",
    "url": "https://www.apartments.com/the-vitagraph-brooklyn-ny/21jytlc/",
    "listing_key": "21jytlc",
    "phone": "929-552-3637",
    "description": "The Vitagraph Apartments",
    "street_address": "1277 E 14th St",
    "city": "Brooklyn",
    "state": "NY",
    "zip_code": "11230",
    "country": "US",
    "latitude": 40.61882,
    "longitude": -73.96065,
    "property_type": "Apartment Complex",
    "price_min": 4175,
    "price_max": 4490,
    "currency": "USD",
    "availability": "Available",
    "amenities": [
        "Pets Allowed",
        "Fitness Center",
        "Dishwasher",
        "Refrigerator",
        "Kitchen",
        "In Unit Washer & Dryer",
        "Lobby"
    ],
    "image_url": "https://images1.apartments.com/i2/yWFnyY6I0FpRzDFuq1uyXFVvqmgENPZpJpZL7BA-cag/117/the-vitagraph-brooklyn-ny-interior-photo.jpg",
    "image_urls": [
        "https://images1.apartments.com/i2/yWFnyY6I0FpRzDFuq1uyXFVvqmgENPZpJpZL7BA-cag/117/the-vitagraph-brooklyn-ny-interior-photo.jpg",
        "https://images1.apartments.com/i2/5e_33OHpSbMTaKe2GkJQ28oam01hsfWc35xmdlU2glM/117/the-vitagraph-brooklyn-ny-interior-photo.jpg",
        "https://images1.apartments.com/i2/7jKn_p0YrCkAvpgJNpk5Zd8GqBqFvdR1UnlA8vvyp84/117/the-vitagraph-brooklyn-ny-interior-photo.jpg"
    ],
    "source": "apartments.com",
    "search_url": "https://www.apartments.com/brooklyn-ny/",
    "page": 1,
    "position": 2,
    "scraped_at": "2026-10-24T08:19:31.603Z"
}
```

The sample shows three of the 95 photo URLs returned for this property.

### Tips for Best Results

- Use `startUrl` when you want an exact search, filter combination, or page order from Apartments.com.
- Use `location` when you want the Actor to build the search for you.
- Keep `results_wanted` small during your first run, then increase it after you confirm the output.
- `filters.bedrooms` and `filters.propertyType` are applied in the search URL. `filters.minPrice` and `filters.maxPrice` are applied to the collected listings.
- A price filter keeps a listing when its advertised rent range overlaps your range. A property with prices from $2,995 to $3,195 can still appear in a search with a $3,000 maximum.
- Residential proxies are recommended. Data-center requests are more likely to be blocked. Leave the proxy country empty to let the Actor rotate locations when a request is challenged.
- The Actor reuses a working proxy session and its cookies across pages, so larger runs are less likely to be interrupted by blocks.
- Property photos are collected for every listing, so `image_urls` can contain dozens of URLs.
- Amenities are merged from the listing details and the property media labels without opening detail pages. If the source does not publish any amenity data, the `amenities` field is omitted.
- Some listings do not publish rent or a description. Those fields are omitted from the record.
- If a run returns fewer records than requested, raise `max_pages` or widen the filters.

### Integrations

- Send listings to Google Sheets for review and sharing.
- Trigger a downstream workflow with webhooks after each run.
- Connect datasets to Make or Zapier automations.
- Pull dataset items into your own application through the Apify API.
- Download results as CSV, Excel, JSON, or XML.

### Frequently Asked Questions

#### Can I export the data to CSV or Excel?

Yes. Apify datasets can be downloaded as CSV, Excel, JSON, XML, and other supported formats.

#### Can I run this Actor on a schedule?

Yes. Schedule the Actor in Apify Console to refresh rental data daily, weekly, or at another interval.

#### Can I search by ZIP code?

Yes. Enter a five-digit ZIP code in `location`. The Actor resolves the city and state, then searches that ZIP code.

#### Can I scrape a single property page?

Yes. Paste the property URL in `startUrl`. The Actor returns one record with the property details and available fields.

#### Why are some rent values missing?

Some listings do not publish rent on Apartments.com. When a listing has no rent data, the rent fields are omitted instead of being saved as null.

#### Why do I get fewer results than I requested?

The location may have fewer matching listings after your filters, or the page limit may be too low. Increase `max_pages` or widen the filters. Listings without published rent are excluded when a price filter is active.

#### Does a URL or a location win when both are provided?

The URL wins. The Actor ignores `location` and `filters` in that case and follows the URL as supplied.

#### Is this Actor suitable for non-technical users?

Yes. You can run it from Apify Console with the form inputs and download the dataset without writing code.

#### Is it legal to scrape Apartments.com?

Scraping public web data can be legal, but you are responsible for complying with applicable laws, website terms, and privacy rules. Use the data responsibly and do not overload the site.

### Support

For issues, feature requests, or custom Actor work, use the Issues tab on the Actor page or contact the developer through Apify.

### Legal Notice

This Actor is designed for legitimate data collection from publicly available sources. Users are responsible for using the data responsibly and complying with applicable laws and website terms.

# Actor input Schema

## `startUrl` (type: `string`):

Full Apartments.com search or property URL. Takes precedence over Location. Leave empty to search by location.

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

City and state, neighborhood, or ZIP code, for example Brooklyn, NY, Williamsburg, Brooklyn, NY, or 11201.

## `filters` (type: `object`):

Optional filters for location searches. A Start URL keeps its own filters.

## `results_wanted` (type: `integer`):

Maximum number of listings to save.

## `max_pages` (type: `integer`):

Maximum number of search result pages to visit.

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

Apify Proxy is recommended. Residential proxies are used by default, with location fallback when a request is challenged.

## Actor input object example

```json
{
  "location": "Brooklyn, NY",
  "filters": {},
  "results_wanted": 20,
  "max_pages": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "location": "Brooklyn, NY"
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/apartments-scraper-api").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 = { "location": "Brooklyn, NY" }

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/apartments-scraper-api").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 '{
  "location": "Brooklyn, NY"
}' |
apify call shahidirfan/apartments-scraper-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shahidirfan/apartments-scraper-api"
        }
    }
}
```

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/OhxpwLstLC3XAplgO/builds/QaMsphgsLiHigW766/openapi.json
