# StreetEasy NYC Scraper — Sale + Rent · Price/SqFt · Market KPIs (`sian.agency/streeteasy-property-scraper`) Actor

🏙️ Scrape StreetEasy NYC listings — sale + rent, all 5 boroughs, with built-in market KPIs (median price, price/sqft distribution, area breakdowns) and HTML report. School enrichment + bulk input. Independent tool — not affiliated with StreetEasy or Zillow Group.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

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

## StreetEasy NYC Scraper — Sale + Rent · Price/SqFt · Market KPIs 🏙️

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian)
[![Related Actor](https://img.shields.io/badge/Store-Airbnb%20Scraper-E4405F)](https://apify.com/sian.agency/airbnb-property-scraper?fpr=sian)

#### 🎯 Extract NYC Sale + Rent Listings With Market KPIs in Seconds
##### Real estate investors, brokers, market analysts, and NYC researchers — get full listing data plus price/sqft analytics across all five boroughs

---

### 📋 Overview

**Pull StreetEasy NYC listings — both for-sale AND rentals — into clean structured data.** Search Manhattan, Brooklyn, Queens, Bronx, or Staten Island by borough or by specific neighborhood ID, and get back complete listings with calculated price-per-sqft, beds/baths, square footage, building type, geo coordinates, source agent, and photo metadata.

**Why investors and brokers choose us over the alternatives:**
- 📊 **Analytics included, not just raw data**: Auto-generated HTML market report with median price, price/sqft distribution (min/median/avg/p90/max), top areas by inventory, and building-type breakdown — computed for you on every run
- 🧮 **Calculated price/sqft on every listing**: Skip the spreadsheet step — comp sheets and CMAs are ready straight from the dataset
- ✅ **Sale + Rent in one actor**: One `listingType` toggle gets you sales, rentals, or both sides — purpose-built for buy-vs-rent and price-to-rent ratio analysis
- 🗽 **All 5 NYC boroughs + 340+ named neighborhoods**: Whole-borough sweeps or surgical neighborhood targeting
- 🎓 **Optional school enrichment**: Nearby public schools per listing for family-buyer workflows (PAID)
- 🆓 **FREE tier with full feature parity**: 25 listings per run, no credit card, same KPIs and HTML report — just a smaller cap

---

### ✨ Features

- 🏠 **Both sides of the market** — sales (condos, co-ops, houses) and rentals (apartments, units) via a single `listingType` toggle
- 🧭 **Two location modes** — by **borough** (Manhattan / Brooklyn / Queens / Bronx / Staten Island) or by **neighborhood ID** (e.g. 302 = Williamsburg, 319 = Park Slope)
- 📊 **Auto-calculated price/sqft** — for every listing with usable square footage
- 📈 **Market KPIs in HTML report** — median price, price/sqft distribution (min/median/avg/p90/max), top areas by inventory, building type tally
- 🏢 **Rental-specific fields** — `availableAt`, `monthsFree`, `noFee`, `netEffectivePrice`, `furnished`, `leaseTermMonths`
- 🎓 **School data enrichment** — nearby public schools per listing (PAID toggle)
- 📦 **Bulk neighborhood search** — pass an array of area IDs in one run (PAID)
- 📱 **Standard Apify exports** — JSON, CSV, XLSX, RSS, HTML

---

### 🎬 Quick Start

Three inputs, no coding:

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~streeteasy-property-scraper/runs?token=[YOUR_TOKEN]' \
  -H 'Content-Type: application/json' \
  -d '{"searchMode":"borough","borough":"Manhattan","listingType":"sale","maxResults":50}'
````

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Pick Sale, Rent, or Both

Set `listingType` to `sale`, `rent`, or `both`. Both runs each query twice (PAID — doubles the query count).

#### Step 2: Pick Your Location

Either set `searchMode: "borough"` and pick one of the five NYC boroughs, or set `searchMode: "area"` and pass a StreetEasy neighborhood ID (e.g. `302` for Williamsburg).

#### Step 3: Run & Export

Hit Run. Listings stream into the dataset; an HTML market report lands in the key-value store. Export as JSON, CSV, or Excel.

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

- Complete listings with address, specs, pricing, photos, geo
- Auto-calculated price/sqft per listing
- Market-level KPIs (median price, distribution, area + type breakdowns)
- A polished HTML market summary

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listingType` | string | No | `sale`, `rent`, or `both` (default: `sale`). `both` is PAID-only. |
| `searchMode` | string | No | `borough` or `area` (default: `borough`). |
| `borough` | string | If `searchMode=borough` | Manhattan, Brooklyn, Queens, Bronx, Staten Island. |
| `areaId` | integer | If `searchMode=area` | StreetEasy neighborhood ID (e.g. 302 = Williamsburg). |
| `areaIds` | array | No | Multiple neighborhood IDs in one run (PAID only). |
| `maxResults` | integer | No | Listings per query, 1–500 (default: 50). FREE tier capped at 25 per run. |
| `includeSchools` | boolean | No | Fetch nearby schools per listing — PAID only (default: false). |

**Example — Borough sale search:**

```json
{
  "listingType": "sale",
  "searchMode": "borough",
  "borough": "Brooklyn",
  "maxResults": 100
}
```

**Example — Williamsburg rentals:**

```json
{
  "listingType": "rent",
  "searchMode": "area",
  "areaId": 302,
  "maxResults": 50
}
```

**Example — Bulk neighborhoods, both sides of market, with schools:**

```json
{
  "listingType": "both",
  "searchMode": "area",
  "areaIds": [302, 319, 301],
  "maxResults": 200,
  "includeSchools": true
}
```

***

### 📤 Output

Results land in the Apify dataset. Common fields across both sale and rent:

| Field | Type | Description |
|-------|------|-------------|
| `propertyId` | string | Unique StreetEasy property ID |
| `listingType` | string | `sale` or `rent` |
| `url` | string | Full listing URL on streeteasy.com |
| `title` | string | Address with unit |
| `areaName` | string | Neighborhood name |
| `address` | object | `street`, `unit`, `neighborhood`, `full` |
| `pricing` | object | `price`, `pricePerSqft` (+ rent fields when applicable) |
| `specs` | object | `beds`, `bathsFull`, `bathsHalf`, `bathsTotal`, `sqft`, `buildingType`, `furnished` |
| `location` | object | `latitude`, `longitude` |
| `source` | object | Listing agent / brokerage info |
| `media` | object | Photo count, 3D tours, video flag |
| `status` | string | `ACTIVE`, `DELISTED`, etc. |
| `rental` | object | (Rent only) `availableAt`, `leaseTermMonths`, `isNewDevelopment` |
| `schools` | array | (Optional) Nearby public schools |
| `schoolCount` | number | (Optional) Count of nearby schools |
| `scrapedAt` | string | ISO timestamp |

**Sale example:**

```json
{
  "propertyId": "1814683",
  "listingType": "sale",
  "url": "https://streeteasy.com/building/bergen-brooklyn/ph-706e",
  "title": "323 Bergen Street, PH 706E",
  "areaName": "Boerum Hill",
  "pricing": { "price": 4625000, "pricePerSqft": 1808 },
  "specs": { "beds": 3, "bathsFull": 2, "bathsHalf": 1, "bathsTotal": 3, "sqft": 2558, "buildingType": "CONDO" },
  "location": { "latitude": 40.68333, "longitude": -73.98045 },
  "source": { "label": "Compass", "type": "PARTNER" },
  "status": "ACTIVE"
}
```

**Rent example:**

```json
{
  "propertyId": "5007580",
  "listingType": "rent",
  "url": "https://streeteasy.com/building/the-kent-house/203",
  "title": "187 Kent Avenue, 203",
  "areaName": "Williamsburg",
  "pricing": { "price": 4800, "pricePerSqft": null, "monthsFree": 0, "noFee": false },
  "specs": { "beds": 1, "bathsTotal": 1, "buildingType": "RENTAL", "furnished": false },
  "rental": { "availableAt": "2026-05-01", "leaseTermMonths": null, "isNewDevelopment": false }
}
```

***

### 💼 Use Cases & Examples

#### 1. Investment Underwriting (Sale)

**Investors comparing condos by price/sqft across Brooklyn neighborhoods**

**Input:** `areaIds: [302, 319, 301]`, `listingType: "sale"`
**Output:** Listings with calculated price/sqft + median per area
**Use:** Spot the cheapest $/sqft pockets; build comp sheets in minutes.

#### 2. Rental Market Analysis

**Brokers tracking rent trends in Williamsburg vs. Bushwick**

**Input:** `listingType: "rent"`, two neighborhood IDs, weekly schedule
**Output:** Median rent, no-fee inventory, available-at distribution
**Use:** Generate weekly rental market briefs for clients.

#### 3. Sale + Rent Side-by-Side

**Investors checking buy-vs-rent ratios in one neighborhood**

**Input:** `listingType: "both"`, `areaId: 319` (Park Slope)
**Output:** Sales and rentals from the same area in one dataset
**Use:** Compute price-to-rent ratios for cash-flow analysis.

#### 4. CMA / Comparables for Agents

**Agents preparing CMAs for upcoming listings**

**Input:** Borough or neighborhood, `maxResults: 200`
**Output:** Recent listings with full specs and prices
**Use:** Plug straight into comp sheets and CMA reports.

#### 5. School District Property Search

**Families filtering by nearby schools**

**Input:** `borough: "Queens"`, `includeSchools: true`
**Output:** Listings with adjoined school data
**Use:** Rank properties by school proximity.

#### 6. AVM / ML Training Data

**Data scientists building NYC valuation models**

**Input:** Bulk borough sweep, `listingType: "both"`
**Output:** Comprehensive sale + rent dataset with specs + geo
**Use:** Train and validate AVM and rent-prediction models.

***

### 🔗 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/streeteasy-property-scraper').call({
  listingType: 'both',
  searchMode: 'borough',
  borough: 'Manhattan',
  maxResults: 100,
  includeSchools: true
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

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

run = client.actor('sian.agency/streeteasy-property-scraper').call(
    run_input={
        'listingType': 'rent',
        'searchMode': 'area',
        'areaId': 302,
        'maxResults': 100
    }
)

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

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~streeteasy-property-scraper/runs?token=YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"listingType":"sale","searchMode":"borough","borough":"Queens","maxResults":150}'
```

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

1. **Trigger**: Schedule (daily / weekly market refresh) or webhook
2. **HTTP Request**: Call StreetEasy scraper API with target neighborhood
3. **Process**: Filter by price band, compute KPIs, dedupe against last run
4. **Action**: Push to DB, send Slack/email digest, update dashboard

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **25 listings** per run — full feature parity, same data quality
- 5 queries per run
- No credit card required
- Perfect for testing and one-off analyses

#### PAID Tier (Production Ready)

- **Unlimited** listings and queries per run
- `listingType: "both"` (sale + rent in one run)
- Bulk neighborhood arrays
- School data enrichment
- Pay-per-result: only charged for listings actually returned

💰 **Transparent per-result pricing** — $0.005 per listing extracted, $0.003 per school enrichment, $0.005 per actor start. **What you get for the price**: every listing comes with calculated price/sqft and the run produces a full HTML market report with median, distribution, and area breakdowns — no post-processing required, no separate analytics tier.

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

***

### ❓ Frequently Asked Questions

**Q: Does this cover rentals?**
A: Yes — set `listingType: "rent"` for rentals only, or `listingType: "both"` (PAID) to scrape sale + rent in a single run.

**Q: How many listings can I extract?**
A: FREE tier: 25 per run. PAID tier: unlimited. Each query auto-paginates up to 5 pages (~250 listings).

**Q: Why does `pricePerSqft` come back null on some rentals?**
A: StreetEasy rental records often omit square footage. We only compute price/sqft when the listing reports usable sqft.

**Q: Do you cover boroughs outside Manhattan?**
A: Yes — all 5 boroughs plus 340+ named neighborhoods. Use `searchMode: "borough"` for whole-borough sweeps or `searchMode: "area"` with a neighborhood ID for granular targeting.

**Q: What output formats are available?**
A: JSON, CSV, Excel — exported directly from the Apify dataset.

**Q: How long does a run take?**
A: Roughly 1–2 seconds per 50 listings, plus ~200ms per listing if school enrichment is enabled.

**Q: Is this legal?**
A: We only extract publicly available listings from StreetEasy. See the legal section below.

***

### 🐛 Troubleshooting

**"Area ID not found" error**

- Confirm the ID exists. Common IDs: 100=Manhattan, 200=Bronx, 300=Brooklyn, 302=Williamsburg, 319=Park Slope, 400=Queens, 500=Staten Island.
- Use `searchMode: "borough"` if you only want a whole-borough sweep.

**`listingType: "both"` rejected**

- `both` runs each query twice and requires PAID. Use `sale` or `rent` on FREE tier.

**No school data on a listing**

- Not all properties have nearby school records. Schools require `includeSchools: true` on PAID tier.

**FREE tier hit at 25 listings**

- That's the FREE cap. Upgrade for unlimited.

***

### ⚠️ Trademark Disclaimer

This Actor is an independent tool and is **not affiliated with, endorsed by, or sponsored by StreetEasy, Zillow Group, Inc., or any of their subsidiaries**. The name "StreetEasy" is used solely in a descriptive sense to identify the public data source the Actor reads from. All trademarks, service marks, and trade names referenced in this Actor or its documentation are the property of their respective owners.

***

### ⚖️ 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
- 📧 <hello@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

## `listingType` (type: `string`):

Which side of the market to scrape.

• **sale** — for-sale listings (condos, co-ops, houses)
• **rent** — rental listings (apartments, units)
• **both** — runs each query twice, once for sale and once for rent (PAID — doubles the query count)

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

How to specify the location.

• **area** — by neighborhood ID (e.g. 302 = Williamsburg)
• **borough** — by NYC borough name

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

Hard cap on listings returned per query. Auto-paginates until the cap is reached or the search is fully drained. Default 50 = one API page. FREE tier is always capped at 25 listings per run.

## `areaId` (type: `integer`):

StreetEasy neighborhood ID. Examples: 302 = Williamsburg, 319 = Park Slope, 100 = Manhattan (full borough), 300 = Brooklyn (full borough). Use the borough mode for whole-borough searches.

## `areaIds` (type: `array`):

Array of StreetEasy neighborhood IDs. PAID tier only.

## `borough` (type: `string`):

NYC borough to search.

## `includeSchools` (type: `boolean`):

When ON, fetches nearby public schools for each listing (1 extra API call per listing). Adds a SchoolsEnriched charge per listing. Disabled on FREE tier.

## Actor input object example

```json
{
  "listingType": "sale",
  "searchMode": "borough",
  "maxResults": 50,
  "areaId": 302,
  "borough": "Manhattan",
  "includeSchools": false
}
```

# Actor output Schema

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

Structured StreetEasy sale and rent listings with calculated price/sqft and (optional) school data.

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

HTML summary with run stats, market KPIs (median price, price/sqft distribution), area + building-type breakdowns, 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/streeteasy-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/streeteasy-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/streeteasy-property-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "StreetEasy NYC Scraper — Sale + Rent · Price/SqFt · Market KPIs",
        "description": "🏙️ Scrape StreetEasy NYC listings — sale + rent, all 5 boroughs, with built-in market KPIs (median price, price/sqft distribution, area breakdowns) and HTML report. School enrichment + bulk input. Independent tool — not affiliated with StreetEasy or Zillow Group.",
        "version": "1.0",
        "x-build-id": "hh8G9kO5lY6whdJMG"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~streeteasy-property-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-streeteasy-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~streeteasy-property-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-streeteasy-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~streeteasy-property-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-streeteasy-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": {
                    "listingType": {
                        "title": "🏠 Listing Type",
                        "enum": [
                            "sale",
                            "rent",
                            "both"
                        ],
                        "type": "string",
                        "description": "Which side of the market to scrape.\n\n• **sale** — for-sale listings (condos, co-ops, houses)\n• **rent** — rental listings (apartments, units)\n• **both** — runs each query twice, once for sale and once for rent (PAID — doubles the query count)",
                        "default": "sale"
                    },
                    "searchMode": {
                        "title": "🧭 Search Mode",
                        "enum": [
                            "area",
                            "borough"
                        ],
                        "type": "string",
                        "description": "How to specify the location.\n\n• **area** — by neighborhood ID (e.g. 302 = Williamsburg)\n• **borough** — by NYC borough name",
                        "default": "borough"
                    },
                    "maxResults": {
                        "title": "📊 Max results per query",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Hard cap on listings returned per query. Auto-paginates until the cap is reached or the search is fully drained. Default 50 = one API page. FREE tier is always capped at 25 listings per run.",
                        "default": 50
                    },
                    "areaId": {
                        "title": "📍 Area ID  (used when Search Mode = area)",
                        "type": "integer",
                        "description": "StreetEasy neighborhood ID. Examples: 302 = Williamsburg, 319 = Park Slope, 100 = Manhattan (full borough), 300 = Brooklyn (full borough). Use the borough mode for whole-borough searches.",
                        "default": 302
                    },
                    "areaIds": {
                        "title": "📋 Bulk Area IDs  (PAID, area mode)",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Array of StreetEasy neighborhood IDs. PAID tier only.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "borough": {
                        "title": "🏙️ Borough  (used when Search Mode = borough)",
                        "enum": [
                            "Manhattan",
                            "Brooklyn",
                            "Queens",
                            "Bronx",
                            "Staten Island"
                        ],
                        "type": "string",
                        "description": "NYC borough to search.",
                        "default": "Manhattan"
                    },
                    "includeSchools": {
                        "title": "🎓 Include school data (PAID)",
                        "type": "boolean",
                        "description": "When ON, fetches nearby public schools for each listing (1 extra API call per listing). Adds a SchoolsEnriched charge per listing. 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
