# Apartment List Scraper (`powerful_bachelor/apartment-list-scraper`) Actor

🏢 Apartment List Scraper: Extracts detailed info from apartment listings, including rental ID, display name, address, contact info, pricing, and amenities. Easily handle images and customize inputs for efficient data processing. Perfect for real estate apps! 📊🏷️📞

- **URL**: https://apify.com/powerful_bachelor/apartment-list-scraper.md
- **Developed by:** [Powerful Bachelor](https://apify.com/powerful_bachelor) (community)
- **Categories:** Real estate, Travel
- **Stats:** 11 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 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

## 🏢 Apartment List Scraper

[![Actor status](https://apify.com/actor-badge?actor=powerful_bachelor/Apartment-List-Scraper)](https://apify.com/powerful_bachelor/Apartment-List-Scraper)

### Overview

The Apartment List Scraper is a tool designed to extract detailed information from apartment listings. This tool processes JSON data to provide a structured overview of each listing, making it easier to analyze and utilize the data for various applications.

### Key Features

- **📋 Extracts Comprehensive Listing Information**: The scraper captures a wide range of data points from each listing, ensuring you have all the necessary details at your fingertips.
- **🖼️ Image Handling**: Automatically generates URLs for listing images, making it easy to display them in your applications.

### Data Points

Search result pages expose the following fields for each listing:

- **🆔 Rental ID**: A unique identifier for each rental listing.
- **🏷️ Display Name**: The name of the listing as shown on the platform.
- **📍 Location**: Latitude and longitude.
- **💲 Prices**: The headline rent range by bedroom count.
- **🔗 Listing URL**: A link to the listing's detail page.
- **🖼️ Photos**: Image URLs for the listing, formatted ready to display.
- **📊 Search Rank**: The listing's position in the result set.
- **🏷️ Slug**: The listing's URL slug.

> Apartment List now renders listing detail (description, amenities, fees, contact
> details) behind a server-side API that requires a key the site does not expose to
> browsers. Those fields are returned as `null` so the output shape stays stable.

### Usage

Provide a list of URLs for the apartment listings you wish to process. The scraper will return a structured JSON object containing the data points listed above.

#### Residential proxy

Apartment List only serves results to US IPs — requests from anywhere else get a
regional block page. The Actor uses a US residential proxy automatically; no
configuration is required.

### Example Output

```json
{
  "rentalId": "12345",
  "displayName": "Luxury Apartment",
  "firstPhoto": "https://res.cloudinary.com/apartmentlist/image/upload/c_fill,dpr_auto,f_auto,g_center,h_415,q_auto,w_640/photo_id.jpg",
  "formattedAddress": null,
  "prices": { "0": null, "1": 1899, "2": null, "3": null },
  "showPrice": true,
  "websiteUrl": "https://www.apartmentlist.com/listing-slug",
  "slug": "listing-slug",
  "rank": 1,
  "latitude": 34.05,
  "longitude": -118.24,
  "allPhotos": [
    "https://res.cloudinary.com/apartmentlist/image/upload/c_fill,dpr_auto,f_auto,g_center,h_415,q_auto,w_640/photo1.jpg"
  ]
}
```

### Conclusion

The Apartment List Scraper extracts the listing data Apartment List actually publishes on its search pages. Whether you're building a real estate application or conducting market research, it returns clean, structured results for any supported city.

# Actor input Schema

## `urls` (type: `array`):

Enter the URLs of the apartment listings you want to scrape.

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

Maximum number of listings to return across all URLs. A single search page exposes its full result set, so no pagination is needed.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.apartmentlist.com/ca/los-angeles"
    }
  ],
  "maxResults": 15
}
```

# Actor output Schema

## `results` (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 = {
    "urls": [
        {
            "url": "https://www.apartmentlist.com/ca/los-angeles"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerful_bachelor/apartment-list-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 = { "urls": [{ "url": "https://www.apartmentlist.com/ca/los-angeles" }] }

# Run the Actor and wait for it to finish
run = client.actor("powerful_bachelor/apartment-list-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 '{
  "urls": [
    {
      "url": "https://www.apartmentlist.com/ca/los-angeles"
    }
  ]
}' |
apify call powerful_bachelor/apartment-list-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerful_bachelor/apartment-list-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/PiRvQd4Zzl3aJT9Cv/builds/0eGnOK6bcDvbRc4Jw/openapi.json
