Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StreetEasy Scraper API - Python

A powerful Python scraper for extracting NYC real estate data from StreetEasy. Search buy and rental listings across Manhattan, Brooklyn, Queens, Bronx, and all NYC boroughs using the StreetEasy Scraper API by RealtyAPI.

Features

  • Buy Search - Search for-sale listings with 25+ filters (price, beds, baths, amenities, building type, prewar, transit lines, schools, and more)
  • Rent Search - Search rental listings with move-in date, pet-friendly, FRBO, and all standard filters
  • Sale Details - Full property data by listing ID or StreetEasy URL
  • Rental Details - Full rental data by listing ID or StreetEasy URL
  • Multi-Borough Search - Search Manhattan, Brooklyn, Bronx, Queens simultaneously
  • Transit Line Filter - Filter by NYC subway lines (1-7, A-Z, PATH, HBLR)
  • School Filter - Filter by nearby schools
  • All Locations - Get every borough and neighborhood on StreetEasy
  • Schools List - Get every school for the school filter
  • Bulk Mode - Process hundreds of listings from input.json with progress tracking
  • Export to JSON or CSV - Save results in your preferred format

Quick Start

1. Get Your API Key

Sign up at realtyapi.io to get your API key.

2. Install

git clone https://github.com/realtyapi/streeteasy-scraper-python.git
cd streeteasy-scraper-python
pip install -r requirements.txt

3. Run the Interactive Scraper

python scraper.py

4. Or Use the API Directly in Your Code

import requests

url = "https://streeteasy.realtyapi.io/search/buy"

params = {
    "location": "manhattan",
    "priceRange": "500000-3000000",
    "beds": "2",
    "sort_by": "Newest"
}

headers = {
    "x-realtyapi-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers, params=params)
print(response.json())

Usage Examples

Search For-Sale Listings

from streeteasy_api import StreetEasyAPI

api = StreetEasyAPI("YOUR_API_KEY")

data = api.search_buy(
    location="manhattan",
    price_range="500000-3000000",
    beds="2",
    baths="1_plus",
    sort_by="Newest",
    building_type="condo,co-op",
)
print(data)

Search with Amenities

data = api.search_buy(
    location="brooklyn",
    amenities="doorman,elevator,gym",
    pets=True,
    sort_by="Least_expensive",
)
print(data)

Multi-Borough Search

data = api.search_buy(
    location="manhattan,bronx,brooklyn,queens",
    price_range="200000-1000000",
    sort_by="Least_expensive",
)
print(data)

Search Rentals

data = api.search_rent(
    location="manhattan",
    price_range="2000-5000",
    beds="1_plus",
    sort_by="Newest",
    pets=True,
)
print(data)

Search Rentals by Subway Line

data = api.search_rent(
    location="manhattan,brooklyn",
    transit_lines="1,6,L",
    price_range="1500-4000",
    beds="studio",
)
print(data)

Search with Move-In Date

data = api.search_rent(
    location="manhattan",
    move_in_date="20250301",
    move_in_date_type="on_or_before",
    beds="1",
)
print(data)

Sale Details by ID

# Get listing ID from search results: search_results > listings > node > id
data = api.get_sale_details_by_id("1771911")
print(data)

Sale Details by URL

data = api.get_sale_details_by_url(
    "https://streeteasy.com/building/one-wall-street/1807"
)
print(data)

Rental Details by ID

data = api.get_rental_details_by_id("4735143")
print(data)

Rental Details by URL

data = api.get_rental_details_by_url(
    "https://streeteasy.com/building/21-west-end-avenue-new_york/2704"
)
print(data)

Get All Locations

# Useful for building location filters
data = api.get_all_locations()
print(data)

Get All Schools

# Useful for the school filter in search
data = api.get_schools()
print(data)

Scraper Modes

Test Mode (Single Input)

Enter one input manually. Shows a preview (first 1000 characters), then asks to save as JSON or CSV.

Bulk Mode (from input.json)

Process hundreds of inputs from input.json. Shows a progress bar, saves all results at the end.

  [========================------] 80% (8/10) {"location": "manhattan", "beds":

Bulk Mode - input.json Format

  1. Copy input_sample.json to input.json
  2. Fill in only the sections you need
  3. Run python scraper.py, pick your operation, select "Bulk run"

input.json Structure

{
  "search_buy": [
    {
      "location": "manhattan",
      "price_range": "500000-3000000",
      "beds": "2",
      "sort_by": "Newest",
      "building_type": "condo,co-op"
    },
    "brooklyn"
  ],

  "search_rent": [
    {
      "location": "manhattan",
      "price_range": "2000-5000",
      "beds": "1_plus",
      "pets": true
    },
    "queens"
  ],

  "sale_ids": ["1771911"],
  "sale_urls": ["https://streeteasy.com/building/one-wall-street/1807"],
  "rental_ids": ["4735143"],
  "rental_urls": ["https://streeteasy.com/building/21-west-end-avenue-new_york/2704"]
}

Output Formats

Option Format Best for
1 JSON (.json) Full nested data, programmatic access
2 CSV (.csv) Spreadsheets, Excel, data analysis
3 Both Keep JSON for detail + CSV for quick review

All output is saved to the output/ directory.

API Configuration

Option 1: Environment Variable

export REALTYAPI_KEY=rt_your_key_here
python scraper.py

Option 2: Config File

{
  "api_key": "rt_your_key_here"
}

Option 3: Direct in Code

from streeteasy_api import StreetEasyAPI
api = StreetEasyAPI("rt_your_key_here")

Search Filter Reference

Bedrooms

any, studio, 1, 1_plus, 2, 2_plus, 3, 3_plus, 4_plus

Bathrooms

any, 1_plus, 1point5_plus, 2_plus, 3_plus

Sort Order

Value Description
Default StreetEasy default
Newest Most recently listed
Recently_updated Recently updated
Most_expensive Highest price first
Least_expensive Lowest price first
Largest Largest sqft first
Smallest Smallest sqft first

Building Type

Buy: condo, house, co-op, multi_family

Rent: rental_units, house, condo, co-op, multi_family

Status

any, active, rented, active_or_contract, unavailable, in_contract

Open House

No_preference, today, tomorrow, next_2_days, next_4_days, next_7_days

Prewar Filter

Buy: no_preference, prewar_listings_only, hide_prewar_listings

Rent: no_preference, prewar_only, hide_prewar

New Developments

no_preference, only_new_development, pre_construction, hide_new_developments

Income Restricted (Buy only)

no_preference, show_only_income_restricted, hide_income_restricted

Move-In Date Type (Rent only)

on_or_before, on_or_after

Amenities

washer_dryer, elevator, dishwasher, private_outdoor_space, central_ac, furnished, fireplace, loft, city_view, garden_view, park_view, skyline_view, waterview, doorman, laundry, parking, gym, public_outdoor_space, pool, pied_a_terre, childrens_playroom, smoke_free, storage, guarantor_ok

Square Footage

>=500, >=600, >=700, >=800, >=900, >=1000, >=1250, >=2000, >=2500, >=3000, >=3500, >=4000, >=5000

Maintenance / Taxes (Buy only)

<=500, <=750, <=1000, <=1500, <=2000, <=2500, <=3000, <=4000, <=5000, <=6000, <=7000, <=8000, <=9000, <=10000, <=15000

NYC Subway Lines

1, 2, 3, 4, 5, 6, 7, A, B, C, D, E, F, M, G, N, Q, R, W, J, Z, L, S, PATH, HBLR

All Available Endpoints

Category Endpoint Description
Search /search/buy Search for-sale listings (25+ filters)
Search /search/rent Search rental listings (20+ filters)
Details /sale_detailsbyid Sale property details by listing ID
Details /sale_detailsbyurl Sale property details by StreetEasy URL
Details /rental_detailsbyid Rental details by listing ID
Details /rental_detailsbyurl Rental details by StreetEasy URL
Reference /all_locations All NYC boroughs and neighborhoods
Reference /schools All schools for search filter

File Structure

streeteasy-scraper-python/
├── scraper.py            # Interactive CLI (test one or bulk run)
├── streeteasy_api.py     # StreetEasy API client library (8 endpoints)
├── config.py             # API key management
├── examples.py           # Code examples for every endpoint
├── input_sample.json     # Template for bulk input (copy to input.json)
├── input.json            # Your bulk input data (gitignored)
├── requirements.txt      # Python dependencies
├── config.json           # Your API key (auto-created, gitignored)
├── output/               # Saved JSON/CSV outputs (auto-created)
└── README.md             # This file

Requirements

  • Python 3.7+
  • requests library

Get Your API Key

Sign up at realtyapi.io to get your StreetEasy Scraper API key.

Related APIs

RealtyAPI also offers scraper APIs for:

License

MIT


Keywords: streeteasy scraper, streeteasy api, streeteasy data scraper, streeteasy property data, streeteasy scraper python, streeteasy listing scraper, streeteasy real estate api, scrape streeteasy, streeteasy scraping tool, streeteasy api python, streeteasy property scraper, streeteasy nyc data, streeteasy rental data, streeteasy manhattan scraper, streeteasy brooklyn scraper, nyc real estate scraper, new york real estate api, nyc apartment scraper, nyc rental scraper, nyc property data api, streeteasy search api, streeteasy condo data, streeteasy co-op data, streeteasy automation, streeteasy data mining, streeteasy web scraper, streeteasy crawler, streeteasy property lookup, streeteasy listing data, nyc housing data, manhattan apartment data, brooklyn rental data, realtyapi, realty api

About

Streeteasy Scraper API in Python. Use this to get Streeteasy data saved to Json/Csv/Excel.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages