apartment-fax-sdk
v0.1.0
Published
Official JavaScript and TypeScript SDK for the Apartment Fax public API.
Maintainers
Readme
Apartment Fax SDK
The official JavaScript and TypeScript client for Apartment Fax's public API endpoints. Use it from Node.js to normalize NYC addresses, read public apartment previews, and check service health.
- Product: apartmentfaxnyc.com
- OpenAPI: api.apartmentfaxnyc.com/openapi.json
- Source: Potarix/apartment-fax
Install
npm install apartment-fax-sdkNode.js 18 or newer is required.
Use
import { ApartmentFaxClient } from 'apartment-fax-sdk'
const apartmentFax = new ApartmentFaxClient()
const address = await apartmentFax.resolveAddress({
address: '117 West 13 Street',
unit: '45',
})
console.log(address.borough, address.bbl)
const health = await apartmentFax.getHealth()
console.log(health.ok, health.version)Public previews use the stable flat slug published by Apartment Fax:
const preview = await apartmentFax.getPreview('213-e-10th-st-apt-4r')
console.log(preview.address, preview.violationCount)Scope
This SDK exposes Apartment Fax's public, read-only integration surface. It does not expose private report compilation, customer orders, Stripe webhooks, or capability tokens. The public API does not currently advertise cross-origin browser access, so use the SDK in a server-side JavaScript or TypeScript application.
API failures throw ApartmentFaxApiError, which includes the HTTP status and parsed
response body.
Versioning
The SDK calls the /v1 public API. Backward-compatible additions stay in v1; breaking
changes use a new major-version path. Apartment Fax will publish at least 180 days of notice
before retiring a version, and deprecated version responses will include Deprecation and
Sunset headers. No v1 retirement is scheduled.
