Building Health Intelligence API
Programmatic access to building distress scores, event histories, and property intelligence for 445,000+ NYC habitational buildings. Built on 25 public data sources and 140+ million events, updated daily.
Validated to predict risk
Higher-risk grades are statistically more likely to precede trouble. In a point-in-time, leakage-controlled backtest (grade as of a fixed date vs. what happened to each building afterward), the score ranked buildings well by their likelihood of developing serious problems — the chronic, maintenance-driven conditions that drive attritional loss. It's a ranking signal, not a verdict. These figures come from a backtest of an earlier version of the score; revalidation on the current production model is ongoing.
In the production model's held-out re-validation, an F-graded building developed a serious hazardous violation or litigation 31.8% of the time versus 0.3% for an A.
AUC in our held-out backtest — strong discrimination by standard risk-model benchmarks. Backtested on an earlier version of the score; revalidation on the current version is ongoing.
The worst ~6% of buildings (grades D/F) capture ~64% of all serious adverse events — concentrated, actionable risk.
Separates risk within every borough and every building-size class — it reads the building, not the neighborhood.
The score targets chronic, maintenance-driven distress (water damage, habitability) — not acute catastrophes or financial default. Full methodology available under NDA on request.
Quick Start
Authenticate with your API key via the Authorization: Bearer header. All responses return JSON with a consistent envelope.
curl -H "Authorization: Bearer sk_live_your_key_here" \ https://api.openstoop.com/api/v1/buildings/1004700039
{
"data": {
"bbl": "1004700039",
"address": "120 ELIZABETH STREET",
"city": "New York",
"zipcode": "10013",
"borough": 1,
"borough_name": "Manhattan",
"residential_units": 22,
"total_units": 24,
"year_built": 1900,
"building_class": "C7",
"owner_name": "JING CHENG REALTY INC.",
"latitude": 40.7192123,
"longitude": -73.9952489,
"scores": {
"total_score": 83,
"health_score": 17,
"grade": "F",
"label": "Distressed",
"scorer_id": "distress_v10_2",
"peer_group": "large-pre-war",
"data_quality": "corroborated",
"components": {
"living_conditions": { "score": 44.2, "grade": "C" },
"building_safety": { "score": 53.1, "grade": "D" },
"complaint_burden": { "score": 22.1, "grade": "B" },
"management_quality": { "score": 20.0, "grade": "B" },
"financial_distress": { "score": 0.0, "grade": "A" },
"deferred_maintenance": { "score": 0.0, "grade": "A" },
"legal_enforcement": { "score": 21.9, "grade": "B" }
},
"flags": ["fdny-vacate-active"]
},
"counts": {
"hpd_violations_total": 82,
"hpd_violations_open": 43,
"hpd_class_c_open": 11,
"dob_violations_total": 11,
"complaints_311": 17,
"permits": 2,
"total_events": 303
},
"confidence": {
"score": 78.03,
"tier": "corroborated",
"flags": [],
"dimensions": {
"coverage": 68.06,
"freshness": 98.49,
"corroboration": 71.43
},
"primary_sources": 8,
"active_families": 5
}
},
"meta": {
"request_id": "req_70fb907e8223",
"api_version": "v1",
"timestamp": "2026-04-03T15:53:55.286Z"
},
"pagination": null,
"_links": {
"self": "/api/v1/buildings/1004700039",
"events": "/api/v1/buildings/1004700039/events",
"trajectory": "/api/v1/buildings/1004700039/trajectory"
}
}For AI agents and researchers
Use OpenStoop as a public-records decision-support source for NYC building condition research. Agents should retrieve the methodology, preserve caveats, and cite the relevant building page or API response.
Machine-readable docs
- /llms.txt — canonical site map for LLMs and agents
- /methodology.md — concise methodology and caveats
- /api-docs.md — agent-readable API reference
Safe interpretation
- Describe grades as public-record risk signals.
- Do not describe a grade as a legal finding, safety certification, or unit-level inspection.
- Preserve source dates, status, confidence, and methodology caveats.
1. Resolve an address to a BBL or building page.
2. Call GET /api/v1/buildings/{bbl} for the summary.
3. Call GET /api/v1/buildings/{bbl}/events for evidence.
4. Cite the OpenStoop building page and preserve public-record caveats.Authentication
API keys use the format sk_live_... for client keys. The playground below uses a public read-only sk_demo_... key. Keys are SHA-256 hashed before storage and never stored in plaintext. All traffic is encrypted via TLS 1.3.
curl -H "Authorization: Bearer sk_live_..." \ https://api.openstoop.com/api/v1/buildings/1004700039
curl -H "X-API-Key: sk_live_..." \ https://api.openstoop.com/api/v1/buildings/1004700039
Key Security
SHA-256 hashed at rest. Cannot be retrieved after generation. Scoped permissions per key.
Transport Security
HTTPS only with TLS 1.3. HSTS enabled. All API traffic encrypted in transit.
Key Management
Keys can be revoked instantly. Revoked keys return 401 immediately. Contact us for rotation.
Try It
Test the API live. A public, read-only demo key is pre-filled and rate-limited — or use your own.
Public demo key: read-only, rate-limited, and safe for testing. Replace it with your own key for production integrations.
API Reference
Base URL: https://api.openstoop.com/api/v1
Live Endpoints
/healthSystem health check. No authentication required.
/buildings/:bblSingle building lookup. Returns distress score, component breakdown, confidence metrics, event counts, and building metadata.
/buildings/batchBatch lookup for up to 500 BBLs in a single request. Returns the same data as single lookup for each building.
/buildings/searchSearch by address. Filter by borough, zip code, and grade.
/buildings/:bbl/eventsPaginated event history with filtering by source, category, severity, and date range. Covers HPD violations, DOB complaints, 311 calls, permits, litigation, and more.
Coming Soon
These endpoints are defined in the API surface and return structured responses, but are not yet fully implemented.
/buildings/:bbl/trajectoryHistorical score trajectory over time. Shows how a building's grade has changed across scoring versions and data updates.
/portfolio/analyzePortfolio risk analysis. Submit up to 10,000 BBLs and receive grade distribution, worst buildings, aggregate risk metrics, and flag summary.
/portfolio/monitorConfigure monitoring alerts for a building portfolio. Receive webhook notifications when buildings cross grade thresholds.
/export/csvExport building data as CSV for up to 10,000 buildings.
Response Envelope
Every response uses a consistent envelope. All field names are snake_case.
| Field | Type | Description |
|---|---|---|
| data | object | Response payload |
| meta.request_id | string | Unique request identifier — include in support requests |
| meta.api_version | string | API version |
| meta.timestamp | string | ISO 8601 UTC response timestamp |
| meta.rate_limit | object | Current rate limit status (limit, remaining, reset_at) |
| pagination | object | null | Cursor-based pagination for list endpoints |
| _links | object | Related resource URLs |
Errors
Errors use the same envelope with a machine-readable code. No internal details are exposed.
{
"error": {
"code": "building_not_found",
"message": "Building 1000000000 not found",
"status": 404
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-03-30T12:00:00Z"
}
}| Status | Code | When |
|---|---|---|
| 400 | invalid_bbl | BBL is not a valid 10-digit number |
| 400 | invalid_request | Malformed request body or parameters |
| 401 | missing_api_key | No API key provided |
| 401 | invalid_api_key | Key is invalid, expired, or revoked |
| 403 | insufficient_scope | Key lacks required permission scope |
| 404 | building_not_found | BBL not in database |
| 429 | rate_limit_exceeded | Rate limit exceeded — see Retry-After header |
| 500 | internal_error | Server error — include request_id when contacting support |
Rate Limiting
Rate limits are per API key. Every response includes rate limit headers so your integration can adapt automatically.
| Header | Description |
|---|---|
| X-RateLimit-Limit | Maximum requests per window |
| X-RateLimit-Remaining | Requests remaining in current window |
| X-RateLimit-Reset | Window reset time (ISO 8601) |
| Retry-After | Seconds to wait before retrying (429 responses only) |
Scoring
Each building receives a proprietary distress score (0-100) derived from multiple dimensions of building health. The model analyzes patterns across 25 public data sources to produce a single grade from A (excellent) to F (distressed). Detailed methodology is available to API clients under NDA.
Data Sources
Scores are derived from 25 NYC public data sources, cross-referenced and refreshed daily. The /sources endpoint is planned for source-level freshness data.
Integration Examples
The API returns standard JSON over HTTPS. No SDK required.
import requests
API_KEY = "sk_live_your_key_here"
BASE = "https://api.openstoop.com/api/v1"
# Look up a building
r = requests.get(f"{BASE}/buildings/1004700039",
headers={"Authorization": f"Bearer {API_KEY}"})
building = r.json()["data"]
print(f"{building['address']}: Grade {building['scores']['grade']}")
# → 120 ELIZABETH STREET: Grade F
# Check components
for name, comp in building["scores"]["components"].items():
print(f" {name}: {comp['score']} ({comp['grade']})")
# Check confidence
conf = building["confidence"]
print(f"Confidence: {conf['score']} ({conf['tier']})")
print(f" Coverage: {conf['dimensions']['coverage']}")
print(f" Freshness: {conf['dimensions']['freshness']}")
Versioning
The API is versioned via URL path (/v1/). Breaking changes will only be introduced in new major versions. Existing versions remain supported with a minimum 12-month deprecation notice.
Changelog
Initial release. Single building lookup, health endpoint, API index, confidence scoring, 7-component distress model (distress_v10_2).
Get Started
API Access
Contact us for API credentials, integration support, and custom data requirements.
Methodology
Detailed documentation of our scoring model, data sources, component weights, and grade system.
View methodology