> ## Documentation Index
> Fetch the complete documentation index at: https://qwady.wiki/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete reference for all Borough API endpoints

## Base URL

All API requests use the following base URL:

```
https://borough.qwady.app/v1
```

## Authentication

Include your API key in the `Authorization` header:

```
Authorization: Bearer BOROUGH-...
```

Free-tier endpoints (search, areas, market, health, and photos) work without authentication but are subject to stricter rate limits. See [Authentication](/borough/authentication) for details.

## Response format

Every endpoint returns a consistent JSON envelope:

```json theme={null}
{
  "data": { ... },
  "meta": {
    "dataAge": "2026-02-15T14:28:00Z",
    "source": "cached"
  }
}
```

Some freshness-sensitive endpoints also include `freshnessThreshold` and `refreshTriggered` in `meta` when a tier-based refresh decision is part of the response.

Paginated endpoints include additional fields in `meta`:

```json theme={null}
{
  "data": [ ... ],
  "meta": {
    "total": 342,
    "page": 1,
    "perPage": 25,
    "dataAge": "2026-02-15T14:25:00Z",
    "source": "cached",
    "links": {
      "self": "https://borough.qwady.app/v1/search/rentals?page=1&perPage=25",
      "first": "https://borough.qwady.app/v1/search/rentals?page=1&perPage=25",
      "last": "https://borough.qwady.app/v1/search/rentals?page=14&perPage=25",
      "prev": null,
      "next": "https://borough.qwady.app/v1/search/rentals?page=2&perPage=25"
    }
  }
}
```

## Endpoint groups

<CardGroup cols={2}>
  <Card title="Search" icon="magnifying-glass" href="/borough/api-reference/search/search-rentals">
    Search rental and sale listings with 20+ filters
  </Card>

  <Card title="Property" icon="house" href="/borough/api-reference/property/get-property">
    Get listing details, price history, fees, and open houses
  </Card>

  <Card title="Building" icon="building" href="/borough/api-reference/building/get-building">
    Building data, listings, quality scores, and HPD violations
  </Card>

  <Card title="Photos" icon="image" href="/borough/reference/photo-urls">
    Deliver supported listing and building images through `/v1/photos/{key}`
  </Card>

  <Card title="Market" icon="chart-line" href="/borough/api-reference/market/get-snapshot">
    Market snapshots, trends, and area comparisons
  </Card>

  <Card title="Areas" icon="map" href="/borough/api-reference/areas/list-areas">
    List all 349 areas: NYC neighborhoods, boroughs, sub-boroughs, and Northern New Jersey
  </Card>

  <Card title="Streaming" icon="signal-stream" href="/borough/api-reference/streaming/stream-listing">
    Live SSE streams for cached + live listing data (Pro+)
  </Card>

  <Card title="Watchers" icon="eye" href="/borough/api-reference/watchers/create-watcher">
    Persistent scheduled monitoring of listings, buildings, and searches (Business+)
  </Card>

  <Card title="Webhooks" icon="bell" href="/borough/api-reference/webhooks/create-webhook">
    Webhook subscriptions for listing change notifications (Business+)
  </Card>
</CardGroup>

## Error handling

All errors follow a consistent format. See [Errors](/borough/guides/error-handling) for the full reference.

```json theme={null}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Listing not found",
    "status": 404
  }
}
```
