Skip to main content

Bearer token

Include your API key in the Authorization header:
Authorization: Bearer BOROUGH_<your-license-key>
Keys are provisioned automatically when you subscribe via Polar.sh.

Key format

Borough API keys use the format BOROUGH_<uuid>, for example:
BOROUGH_a1b2c3d4-e5f6-7890-abcd-ef1234567890

Free-tier access

Search endpoints (/v1/search/rentals, /v1/search/sales) and the areas endpoint (/v1/areas) work without authentication. Unauthenticated requests are subject to:
  • 10 requests/minute rate limit (IP-based)
  • 100 requests/month quota
  • Maximum 10 results per page

Key validation

Keys are validated against the Polar.sh API and cached for 10 minutes. If your key is revoked or expires, cached access will stop within 10 minutes.

Error responses

CodeStatusDescription
MISSING_API_KEY401No Authorization header provided on a protected endpoint
INVALID_API_KEY401Key doesn’t match any active subscription
EXPIRED_API_KEY401Subscription has ended
TIER_RESTRICTED403Endpoint requires a higher tier

Security best practices

  • Store keys in environment variables, never in client-side code
  • Rotate keys by creating a new subscription if compromised
  • Use the minimum tier needed for your use case