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.
- 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.jsonwith progress tracking - Export to JSON or CSV - Save results in your preferred format
Sign up at realtyapi.io to get your API key.
git clone https://github.com/realtyapi/streeteasy-scraper-python.git
cd streeteasy-scraper-python
pip install -r requirements.txtpython scraper.pyimport 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())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)data = api.search_buy(
location="brooklyn",
amenities="doorman,elevator,gym",
pets=True,
sort_by="Least_expensive",
)
print(data)data = api.search_buy(
location="manhattan,bronx,brooklyn,queens",
price_range="200000-1000000",
sort_by="Least_expensive",
)
print(data)data = api.search_rent(
location="manhattan",
price_range="2000-5000",
beds="1_plus",
sort_by="Newest",
pets=True,
)
print(data)data = api.search_rent(
location="manhattan,brooklyn",
transit_lines="1,6,L",
price_range="1500-4000",
beds="studio",
)
print(data)data = api.search_rent(
location="manhattan",
move_in_date="20250301",
move_in_date_type="on_or_before",
beds="1",
)
print(data)# Get listing ID from search results: search_results > listings > node > id
data = api.get_sale_details_by_id("1771911")
print(data)data = api.get_sale_details_by_url(
"https://streeteasy.com/building/one-wall-street/1807"
)
print(data)data = api.get_rental_details_by_id("4735143")
print(data)data = api.get_rental_details_by_url(
"https://streeteasy.com/building/21-west-end-avenue-new_york/2704"
)
print(data)# Useful for building location filters
data = api.get_all_locations()
print(data)# Useful for the school filter in search
data = api.get_schools()
print(data)Enter one input manually. Shows a preview (first 1000 characters), then asks to save as JSON or CSV.
Process hundreds of inputs from input.json. Shows a progress bar, saves all results at the end.
[========================------] 80% (8/10) {"location": "manhattan", "beds":
- Copy
input_sample.jsontoinput.json - Fill in only the sections you need
- Run
python scraper.py, pick your operation, select "Bulk run"
{
"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"]
}| 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.
export REALTYAPI_KEY=rt_your_key_here
python scraper.py{
"api_key": "rt_your_key_here"
}from streeteasy_api import StreetEasyAPI
api = StreetEasyAPI("rt_your_key_here")any, studio, 1, 1_plus, 2, 2_plus, 3, 3_plus, 4_plus
any, 1_plus, 1point5_plus, 2_plus, 3_plus
| 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 |
Buy: condo, house, co-op, multi_family
Rent: rental_units, house, condo, co-op, multi_family
any, active, rented, active_or_contract, unavailable, in_contract
No_preference, today, tomorrow, next_2_days, next_4_days, next_7_days
Buy: no_preference, prewar_listings_only, hide_prewar_listings
Rent: no_preference, prewar_only, hide_prewar
no_preference, only_new_development, pre_construction, hide_new_developments
no_preference, show_only_income_restricted, hide_income_restricted
on_or_before, on_or_after
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
>=500, >=600, >=700, >=800, >=900, >=1000, >=1250, >=2000, >=2500, >=3000, >=3500, >=4000, >=5000
<=500, <=750, <=1000, <=1500, <=2000, <=2500, <=3000, <=4000, <=5000, <=6000, <=7000, <=8000, <=9000, <=10000, <=15000
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
| 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 |
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
- Python 3.7+
requestslibrary
Sign up at realtyapi.io to get your StreetEasy Scraper API key.
RealtyAPI also offers scraper APIs for:
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