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

# Comparables

> Active listings comparable to the reference listing: same listing type
and neighborhood, matching bedroom count, within ±25% of its price,
ranked by price proximity. Cached data only, billed as one request.

**Tier:** Starter+




## OpenAPI

````yaml GET /property/{id}/comparables
openapi: 3.1.0
info:
  title: Borough API
  description: >
    NYC Real Estate Data API: structured access to rental and sale listings,

    building details, neighborhood data, and market statistics.


    ## Authentication


    All authenticated endpoints require a `Bearer` token in the `Authorization`
    header:

    ```

    Authorization: Bearer BOROUGH-<your-license-key>

    ```


    License keys are provisioned automatically when you subscribe (see

    [plans and pricing](https://qwady.wiki/borough/tiers-and-pricing)); existing

    subscribers change plan in the

    [customer portal](https://polar.sh/qwady-solutions-llc/portal). Free-tier

    endpoints (search, areas, market, and photos) work without authentication
    but

    are tracked per IP and subject to IP-based rate limits of 10 requests per

    minute. Send your key on them too: without it they run at Free-tier limits.

    The health check endpoint remains fully public.


    ## Rate Limits


    | Tier     | Requests/min | Requests/month | Max perPage |

    |----------|-------------|----------------|-------------|

    | Free     | 10          | 100            | 10          |

    | Starter  | 30          | 5,000          | 50          |

    | Pro      | 60          | 25,000         | 500         |

    | Business | 120         | 100,000        | 500         |


    Tiered API responses include the `X-RateLimit-Limit` and `X-Quota-*`
    headers,

    plus an `X-Request-Id` header (UUID v4) for request tracing and debugging.

    A per-minute `RATE_LIMIT_EXCEEDED` 429 carries a `Retry-After: 60` header

    (the per-tier limit also puts `error.retryAfter: 60` in the body). A

    monthly `QUOTA_EXCEEDED` 429 carries neither: retrying does not help until

    the billing period resets or the plan changes. The health check remains

    fully public and does not carry quota headers.


    A separate per-IP ceiling of 300 requests per minute applies to requests

    that send a key, before the key is checked. Its 429 is also

    `RATE_LIMIT_EXCEEDED` with a `Retry-After: 60` header, but it has no

    `error.retryAfter` in the body.


    Any request can also return `503`: `SERVICE_DISABLED` while the API is

    temporarily switched off, or, on a request that sends a key or token,

    `UPSTREAM_ERROR` with `error.retryAfter: 5` when the subscription check is

    briefly unavailable. Both are safe to retry with backoff.


    ## Data Freshness


    Freshness-aware JSON data responses include a `meta.dataAge` field (ISO

    8601) indicating when the underlying data was last scraped, and a

    `meta.source` field indicating how the data was served (`cached`, `stale`,

    or `live`). The same values are sent as the `X-Data-Age` and

    `X-Data-Source` response headers.


    Public cache cadence varies by dataset: rental search refreshes every 6h,

    sale search every 8h, listing detail sweeps every 12h, buildings daily at

    03:00 UTC, and market snapshots daily at 05:00 UTC. Broadband enrichment is

    checked monthly, but the underlying FCC source data is published only twice

    a year, so most checks are a no-op; broadband fields currently cover 76.5%

    of eligible buildings (those with an active listing and geocodes).


    The 6h/8h search pass refreshes `price` only for listings that are not yet

    detail-scraped. A detail-scraped listing (`detailScraped: true`) keeps the

    price from its last detail read until that detail is refreshed, which can

    lag the live asking price by days to weeks, while search `meta.dataAge`

    reflects the latest feed sighting rather than when that price was observed.

    Use `GET /property/{id}` when you need a current price.


    Thresholds behave differently on detail routes than on search:


    - **Property and building detail**: a paid-tier request for data older than
      the tier's threshold queues a background refresh, so a later request can
      return fresher data. Business and Internal go further: when listing detail
      is more than 5 minutes old, or a building more than 30 minutes old, the
      request fetches it live first (waiting up to about 8 seconds for a
      listing, 10 for a building) and returns `meta.source: "live"`. If that
      fetch times out or fails, the stored record is returned instead; a fetch
      that timed out still updates the stored record in the background.
    - **Live-fetch budget**: live-first detail, background refreshes, SSE `live`
      events and listing-watcher polls share one live-fetch budget. While that
      budget is held for Borough's scheduled updates, or live fetching is
      paused, detail routes keep serving cached data (`meta.source` `cached` or
      `stale`) and requested refreshes are skipped.
    - **Search**: crossing the threshold only changes the label. Results are
      returned as-is with `meta.source: "stale"` and **no refresh is queued**.
      Search freshness comes solely from the scrape cadence above, so a stale
      search generally means a scheduled scrape was missed. The 8h value is flat
      across every paid tier for that reason.
    - **Free tier**: never triggers a refresh on any route.


    | Tier     | Search Threshold (label only) | Listing Threshold | Building
    Threshold |

    |----------|-------------------------------|-------------------|--------------------|

    | Starter  | 8h                            | 30min             |
    6h                 |

    | Pro      | 8h                            | 15min             |
    3h                 |

    | Business | 8h                            | 10min             |
    2h                 |


    ## Photo URLs


    Listing and building responses include photo keys (32-character hex hashes).

    Use the Borough proxy for first-party image URLs:

    ```

    https://borough.qwady.app/v1/photos/{key}

    ```

    Supported sizes:

    ```

    large_800_400 (default), medium_500_250

    ```
  version: 1.0.0
  contact:
    name: Qwady Solutions LLC
    url: https://borough.qwady.app
    email: api@qwady.com
  license:
    name: Proprietary
    url: https://borough.qwady.app/terms
servers:
  - url: https://borough.qwady.app/v1
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Search
    description: Search rental and sale listings with filters
  - name: Property
    description: Individual listing details and price history
  - name: Building
    description: Building information, amenities, and active listings
  - name: Areas
    description: Neighborhoods, boroughs, and geographic boundaries
  - name: Market
    description: Market snapshots, trends, and area comparisons
  - name: Webhooks
    description: Webhook subscriptions for listing change notifications
  - name: Watchers
    description: >-
      Persistent watchers that poll listings, buildings, and searches on a
      schedule
  - name: Streaming
    description: Server-Sent Events for cached listing data, then live data when available
  - name: Utility
    description: Health checks and internal endpoints
paths:
  /property/{id}/comparables:
    get:
      tags:
        - Property
      summary: Get comparable listings
      description: |
        Active listings comparable to the reference listing: same listing type
        and neighborhood, matching bedroom count, within ±25% of its price,
        ranked by price proximity. Cached data only, billed as one request.

        **Tier:** Starter+
      operationId: getPropertyComparables
      parameters:
        - name: id
          in: path
          required: true
          description: Reference listing ID
          schema:
            type: string
          example: '1763374'
        - name: limit
          in: query
          required: false
          description: >-
            Max comparables to return (default 12, capped at your tier's
            perPage)
          schema:
            type: integer
            minimum: 1
          example: 10
      responses:
        '200':
          description: Comparable listings plus the criteria used to select them
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ListingSummary'
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                      reference:
                        type: object
                        description: >-
                          The reference listing ID and the comparability
                          criteria applied (listingType, areaId, bedroomCount,
                          priceBand).
                      dataAge:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      source:
                        type: string
                        example: cached
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/TierRestricted'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ListingSummary:
      type: object
      properties:
        id:
          type: string
        address:
          $ref: '#/components/schemas/Address'
        price:
          type: integer
          description: >-
            Asking rent or sale price. On search results for a detail-scraped
            listing (`detailScraped: true`) this is the price from its most
            recent detail read, which can lag the live asking price by days to
            weeks; `GET /property/{id}` refreshes stale detail on paid tiers.
        netEffective:
          type:
            - integer
            - 'null'
          description: >-
            Net effective monthly rent after concessions (months free spread
            over the lease). Equals `price` when the rental offers no
            concession. `null` for sales, and for a rental that lists months
            free without a net effective value.
        monthsFree:
          type:
            - integer
            - 'null'
        leaseTermMonths:
          type:
            - integer
            - 'null'
        bedroomCount:
          type:
            - integer
            - 'null'
        fullBathroomCount:
          type:
            - integer
            - 'null'
        halfBathroomCount:
          type:
            - integer
            - 'null'
        sqft:
          description: >-
            Interior square footage. Populated only on detail-scraped listings;
            null otherwise.
          type:
            - integer
            - 'null'
        pricePerSqft:
          description: >-
            Price divided by sqft, rounded to the nearest dollar. Null when sqft
            is unavailable.
          type:
            - integer
            - 'null'
        buildingType:
          description: >-
            Canonical building type. Responses always use these spellings —
            `MULTIFAMILY` is only an input alias for `MULTI_FAMILY` on the
            search filters.
          oneOf:
            - type: string
              enum:
                - CONDO
                - CO_OP
                - CONDOP
                - RENTAL
                - TOWNHOUSE
                - HOUSE
                - SINGLEFAMILY
                - TWOFAMILY
                - THREEFAMILY
                - FOURFAMILY
                - MULTI_FAMILY
                - MIXED_USE
                - HYBRID
                - COMMERCIAL
                - UNKNOWN
            - type: 'null'
        areaName:
          type:
            - string
            - 'null'
        areaId:
          type:
            - integer
            - 'null'
        status:
          type: string
          enum:
            - ACTIVE
            - IN_CONTRACT
            - OFF_MARKET
          description: >-
            Borough stores ACTIVE and OFF_MARKET only. IN_CONTRACT can appear on
            a Business/Internal live response from `GET /property/{id}` or
            `/property/by-url`, in `live` events on listing streams, and in
            listing-watcher change events. It is not stored, so the next cached
            read reports the stored status again, and filtering stored listings
            by IN_CONTRACT matches nothing.
        geoPoint:
          oneOf:
            - $ref: '#/components/schemas/GeoPoint'
            - type: 'null'
        leadPhotoKey:
          type:
            - string
            - 'null'
          description: '32-char hex key. Preferred first-party URL: `/v1/photos/{key}`.'
        sourceGroupLabel:
          type:
            - string
            - 'null'
          description: Brokerage name
        urlPath:
          type: string
        listingType:
          type: string
          enum:
            - rental
            - sale
        listedAt:
          type:
            - string
            - 'null'
          format: date
          description: >-
            Date the listing went on market (YYYY-MM-DD). For listings not yet
            detail-scraped this is the date Borough first observed the listing,
            accurate to within one feed cycle. See listedAtIsApproximate.
        listedAtIsApproximate:
          type: boolean
          description: >-
            True when listedAt is the feed-first-seen estimate (the listing has
            not yet been detail-scraped), false when it is the authoritative
            on-market date from the listing detail page. daysOnMarket inherits
            this accuracy, so use the flag before relying on listedAt /
            daysOnMarket for date filtering or time-on-market analysis.
        availableAt:
          type:
            - string
            - 'null'
          format: date
        daysOnMarket:
          type:
            - integer
            - 'null'
          description: >-
            Derived from listedAt; null when listedAt is unknown. Carries the
            same accuracy as listedAt (see listedAtIsApproximate).
        buildingId:
          type:
            - string
            - 'null'
          description: >-
            ID of the parent building, or null. On search results this is the
            building reference recorded on the listing and may not resolve on
            `GET /building/{id}` (404); property detail, batch and comparables
            return null instead of an unresolvable ID.
        buildingScores:
          type:
            - object
            - 'null'
          description: >-
            Building-level scores for the parent building, or null when the
            building has no scores.
          properties:
            healthScore:
              type:
                - number
                - 'null'
            noiseScore:
              type:
                - number
                - 'null'
            safetyScore:
              type:
                - number
                - 'null'
            transitScore:
              type:
                - number
                - 'null'
            violationsOpen:
              type:
                - number
                - 'null'
            updatedAt:
              type:
                - string
                - 'null'
        noFee:
          type:
            - boolean
            - 'null'
          description: >-
            Whether the listing is broker-fee-free. `null` means this listing
            has not yet been detail-scraped, so Borough has no observed value
            for it; it is not a signal that the listing charges a fee. See
            `detailScraped` below, and the [data freshness
            guide](https://qwady.wiki/borough/guides/data-freshness) for the
            scope of this gap (the share of active listings affected varies over
            time).
        detailScraped:
          type: boolean
          description: >-
            `true` once a detail scrape has run for this listing. This is weaker
            than it looks: a detail scrape that ran but failed to parse a given
            field (e.g. an upstream key rename) still sets this `true` while
            that field stays `null`. Read it as "Borough attempted a detail
            scrape," not "every detail-only field on this listing was observed."
        priceDelta:
          type:
            - integer
            - 'null'
          description: Not currently populated; always `null`.
    Address:
      type: object
      properties:
        street:
          type: string
          example: 157 West 57th Street
        unit:
          type:
            - string
            - 'null'
          example: '#48B'
    GeoPoint:
      type: object
      properties:
        latitude:
          type: number
          format: double
          example: 40.7654
        longitude:
          type: number
          format: double
          example: -73.9791
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
            - status
          properties:
            code:
              type: string
              enum:
                - INVALID_PARAMS
                - MISSING_API_KEY
                - INVALID_API_KEY
                - EXPIRED_API_KEY
                - TIER_RESTRICTED
                - QUOTA_EXCEEDED
                - NOT_FOUND
                - WEBHOOK_NOT_FOUND
                - RATE_LIMIT_EXCEEDED
                - INTERNAL_ERROR
                - UPSTREAM_ERROR
                - SERVICE_DISABLED
            message:
              type: string
            status:
              type: integer
            retryAfter:
              type:
                - integer
                - 'null'
              description: >-
                Seconds to wait before retrying: 60 on the per-tier
                `RATE_LIMIT_EXCEEDED` 429, 5 on a `503 UPSTREAM_ERROR`. Absent
                on `QUOTA_EXCEEDED`.
            quotaContext:
              type:
                - object
                - 'null'
              description: >-
                Upgrade context included on monthly-quota QUOTA_EXCEEDED (429)
                responses; null or absent otherwise. Tiers are uppercase. At the
                top tier `nextTier`, `nextTierQuota` and `upgradeUrl` are null.
              properties:
                currentTier:
                  type: string
                currentQuota:
                  type: integer
                nextTier:
                  type:
                    - string
                    - 'null'
                nextTierQuota:
                  type:
                    - integer
                    - 'null'
                upgradeUrl:
                  type:
                    - string
                    - 'null'
                  format: uri
            upgrade:
              type:
                - object
                - 'null'
              description: >-
                Present on TIER_RESTRICTED (403), RATE_LIMIT_EXCEEDED (429) and
                QUOTA_EXCEEDED (429) when a higher tier would lift the limit;
                absent otherwise. `upgradeUrl` is the checkout for callers
                without a subscription and the customer portal for subscribers,
                so an existing plan is changed rather than duplicated.
              properties:
                currentTier:
                  type: string
                requiredTier:
                  type: string
                  description: The lowest tier that lifts this limit.
                upgradeUrl:
                  type: string
                  format: uri
                pricingUrl:
                  type: string
                  format: uri
  responses:
    BadRequest:
      description: Invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INVALID_PARAMS
              message: must be a non-negative integer
              status: 400
    Unauthorized:
      description: >-
        Invalid, expired or malformed API key or token (sent with a
        `WWW-Authenticate` header). A request with no key at all is treated as
        Free tier, so most paid endpoints answer it with `403 TIER_RESTRICTED`
        instead. Listing, reading, updating and deleting watchers and webhook
        subscriptions returns `401 MISSING_API_KEY` when no key is sent;
        creating them, and opening a watcher stream, returns `403
        TIER_RESTRICTED` first.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INVALID_API_KEY
              message: The provided API key is invalid or expired.
              status: 401
    TierRestricted:
      description: Endpoint not available on current tier
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            paidEndpoint:
              summary: Property or building endpoint without a paid key
              value:
                error:
                  code: TIER_RESTRICTED
                  message: This endpoint requires a paid API key
                  status: 403
                  upgrade:
                    currentTier: FREE
                    requiredTier: STARTER
                    upgradeUrl: >-
                      https://buy.polar.sh/polar_cl_JZdBbGfQTTpzCsWrMh61YXphrbEnbJcdpV0d32AjqsV
                    pricingUrl: >-
                      https://qwady.wiki/borough/tiers-and-pricing?utm_source=api
            streaming:
              summary: Listing stream below Pro
              value:
                error:
                  code: TIER_RESTRICTED
                  message: Streaming requires Pro or Business tier.
                  status: 403
                  upgrade:
                    currentTier: STARTER
                    requiredTier: PRO
                    upgradeUrl: https://polar.sh/qwady-solutions-llc/portal
                    pricingUrl: >-
                      https://qwady.wiki/borough/tiers-and-pricing?utm_source=api
            watchers:
              summary: Watcher change below Business
              value:
                error:
                  code: TIER_RESTRICTED
                  message: Watchers require Business tier.
                  status: 403
                  upgrade:
                    currentTier: PRO
                    requiredTier: BUSINESS
                    upgradeUrl: https://polar.sh/qwady-solutions-llc/portal
                    pricingUrl: >-
                      https://qwady.wiki/borough/tiers-and-pricing?utm_source=api
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: Listing 9999999 not found
              status: 404
    RateLimited:
      description: >-
        Per-minute rate limit (`RATE_LIMIT_EXCEEDED`, with `Retry-After`) or
        monthly quota plus overage (`QUOTA_EXCEEDED`, with `X-Quota-Tier` and,
        when a higher tier exists, `X-Quota-Upgrade-URL`; no `Retry-After`).
      headers:
        Retry-After:
          schema:
            type: integer
          description: >-
            Seconds to wait (always 60). Sent on per-minute
            `RATE_LIMIT_EXCEEDED` responses only; absent on `QUOTA_EXCEEDED`.
        X-Quota-Tier:
          $ref: '#/components/headers/X-Quota-Tier'
        X-Quota-Upgrade-URL:
          $ref: '#/components/headers/X-Quota-Upgrade-URL'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimit:
              summary: Per-minute rate limit exceeded
              value:
                error:
                  code: RATE_LIMIT_EXCEEDED
                  message: >-
                    Rate limit of 10 requests per minute exceeded. Retry after
                    60 seconds.
                  status: 429
                  retryAfter: 60
                  upgrade:
                    currentTier: FREE
                    requiredTier: STARTER
                    upgradeUrl: >-
                      https://buy.polar.sh/polar_cl_JZdBbGfQTTpzCsWrMh61YXphrbEnbJcdpV0d32AjqsV
                    pricingUrl: >-
                      https://qwady.wiki/borough/tiers-and-pricing?utm_source=api
            quotaExceeded:
              summary: Monthly quota and overage cap exhausted
              value:
                error:
                  code: QUOTA_EXCEEDED
                  message: >-
                    Monthly quota of 5000 requests plus overage cap exceeded.
                    Resets at the end of the current billing period
                    (2026-08-01T00:00:00.000Z).
                  status: 429
                  quotaContext:
                    currentTier: STARTER
                    currentQuota: 5000
                    nextTier: PRO
                    nextTierQuota: 25000
                    upgradeUrl: https://polar.sh/qwady-solutions-llc/portal
                  upgrade:
                    currentTier: STARTER
                    requiredTier: PRO
                    upgradeUrl: https://polar.sh/qwady-solutions-llc/portal
                    pricingUrl: >-
                      https://qwady.wiki/borough/tiers-and-pricing?utm_source=api
    InternalError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL_ERROR
              message: An unexpected error occurred
              status: 500
  headers:
    X-Quota-Tier:
      description: The caller's current tier. Sent on QUOTA_EXCEEDED (429) responses.
      schema:
        type: string
    X-Quota-Upgrade-URL:
      description: URL to upgrade to a higher tier. Sent on QUOTA_EXCEEDED (429) responses.
      schema:
        type: string
        format: uri
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: BOROUGH-<uuid>
      description: 'Polar.sh license key. Format: `BOROUGH-<uuid>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.