api.nycalert.ai Swagger UI ↗
DEVELOPER DOCUMENTATION

Build with NYCAlert

The NYC Alert FDNY & NYPD Incident API System. Explore New York City incident endpoints, query the ranked public feed with map pins and tags, and follow each call as it progresses with live SSE updates: headlines, stage and what changed.

$curl https://api.nycalert.ai/health
⌘
35API endpoints
registered
◉
5NYC boroughs
citywide
⌁
LiveEvent streaming
SSE
i

Plans: Free (no key) gets a short first page of the public feed; Member (a free key with an NYC Alert account) gets a little more; partners (paid) get everything. Compare the plans. Public by default: No audience or API key is needed for the public REST and SSE feeds: /v1/feed, /v1/feed/geojson and /v1/feed/stream (v10), or the legacy /v1/incidents routes. News and Buff are protected feeds and remain locked until server-side authorization and credentials are configured. Publishing is autonomous; human approval is not required.

i

Headlines follow the call (v10): every published revision of an incident is a new event whose title states the current state ("Fire Reported at …" → "All Hands Operating at …" → "Fire Under Control at …"), with a stage and a one-line change_summary. How to render incident updates.

EXPLORE

Start building

Everything you need to connect
REFERENCE

API endpoints

i

Data access: This API serves approved and published incidents. The portal does not expose raw radio transmissions, private editorial data, or unpublished events.

NYCAlert API · v0.1.0Base URL https://api.nycalert.ai
GETTING STARTED

Quick start

Without an audience or API key, the API serves the public feed. Use /v1/feed for REST (ranked, with map pins, tags, stage and change summary), /v1/feed/geojson for maps and /v1/feed/stream for SSE; the legacy /v1/incidents and /v1/incidents/stream routes remain available. News and Buff require authorized server-side credentials.

i

Interactive requests use this site's same-origin, read-only proxy because the API does not currently allow browser CORS requests. The proxy only permits public routes, excludes editorial operations, and is rate-limited. Code examples call the API directly.

Make a request

TERMINAL
curl -sS https://api.nycalert.ai/health

Public feed (v10)

TERMINAL
curl -sS 'https://api.nycalert.ai/v1/feed?call_type=fire&borough=bronx&limit=20'
curl -sS 'https://api.nycalert.ai/v1/feed/geojson?bbox=-74.05,40.68,-73.90,40.80&limit=300'
curl -N  'https://api.nycalert.ai/v1/feed/stream?has_geo=true'

Each item carries title, summary, call_type, priority, rank_score, geo (a pin or null), tags, stage and change_summary. Stream events additionally carry event_type, is_update and first_published_at; de-duplicate by event_id.

Audience incident integration

Public requests use GET /v1/feed and GET /v1/feed/stream (or the legacy /v1/incidents routes) without credentials. Buff and News add their feed with feeds=public,buff or feeds=public,news and an Authorization: Bearer tier token held by an authorized backend; the dedicated /v1/audiences/{audience}/incidents and /v1/audiences/{audience}/stream routes remain. Choose an audience and review access requirements.

Base URL

All routes are relative to https://api.nycalert.ai. Request parameters are URL-encoded query strings.

!

Only rely on response fields explicitly documented for each endpoint. Some operations currently have unspecified response schemas; inspect their returned JSON instead of assuming a shape.

GETTING STARTED

Authentication & SSO

Public REST and SSE require no API key. Credentials for protected audiences belong on a trusted backend; selection alone never grants access.

i

Public is available anonymously. News and Buff remain locked until server-side authorization and verified credentials are configured. A denied protected request never silently falls back to the public feed.

What is verified

The feeds are public, buff and news. The v10 API authenticates with Authorization: Bearer <token>: a Buff or News tier token (/v1/feed?feeds=public,buff, the audience routes), an admin token (/v1/admin/*) or a per-company subscriber key nya_sub_… (/v1/feed, /v1/subscriber/*). A missing credential on a route that needs one is 401; a credential of the wrong kind, or a feed you are not entitled to, is 403 (never a silent downgrade to public); repeated failures from one address are 429.

Backend access flow

  1. Verify the user's session with your chosen identity provider.
  2. Map that verified identity to server-side audience entitlements.
  3. Authorize the requested audience on every REST request and SSE connection.
  4. Attach the matching audience credential only on the backend; reject mismatches.
  5. Disable private response caching and audit access without recording tokens or incident payloads.

SSO is an application integration, not a confirmed native NYCAlert endpoint. No identity provider, login flow, or token transport is enabled by this documentation site.

Keep credentials secure

Never put audience credentials in JavaScript, HTML, localStorage, URLs, or copyable browser requests. Future backend configuration may use NYCALERT_AUDIENCE, NYCALERT_AUTH_HEADER_NAME, and NYCALERT_AUTH_HEADER_VALUE; those variables do not unlock this portal today.

AUDIENCE-SCOPED API

Audiences & access

Public is the default feed with no API key required. News and Buff are protected; their visibility is enforced by the API, not browser filtering.

i

Public is available without an API key. News and Buff require server authorization.

i

v10 feeds: the public feed is /v1/feed with feeds=public implied; Buff and News are the same route with feeds=public,buff or feeds=public,news and a tier token, and paid subscribers use their own key. Every feed has its own AI priority and rank; a merged item shows the per-feed breakdown in feeds. Items and events carry stage and change_summary for every feed.

Request previews

PRODUCTION REST · PUBLIC ANONYMOUS / NEWS AND BUFF PROTECTED
PRODUCTION SSE · PUBLIC ANONYMOUS / NEWS AND BUFF PROTECTED

Contract and verification status

  • v10 contract: /v1/feed, /v1/feed/geojson and /v1/feed/stream (anonymous = public), the audience routes (limit 1–100, type, call_type, since_id), Authorization: Bearer for every credential kind.
  • Access behaviour: public is anonymous by default; this portal detects whether the API serves the v10 feed routes and otherwise uses the legacy /v1/incidents routes. /v1/audiences/public is not an audience path (404).
  • Events: incident.created and incident.updated with integer ids, retry:, an id-only block on connect (resume point) and : keep-alive comments. An event can be re-emitted with a fuller feeds breakdown: de-duplicate by event_id.
  • Held, skipped and rejected content never reaches any feed; the admin review outcomes (/v1/admin/review-outcomes) record why, including the revision editor's decisions (revision_editor_no_update, revision_editor_unrelated).
  • To verify with authorized access: per-feed response shapes under a tier token, replay behaviour, cross-feed isolation, heartbeat interval, rate limits and CORS.

Do not assume audience roles have particular priorities, delays, or fields: the guide does not define them. Returned publication timestamps identify published claims; preliminary reports should not be presented as confirmed facts. No human editorial approval is required for live publication.

REAL-TIME API

SSE developer console LIVE STREAM

Connect to published incident events in real time using Server-Sent Events.

i

SSE delivers published events visible to the requesting audience, not every raw radio transmission. On /v1/feed/stream each event is one published revision: the console shows its stage badge, NEW/UPDATE, the current headline and the change summary, with the raw JSON underneath.

!

Leave blank or enter “all” for every published event. Other values are passed to the API as a type filter.
DisconnectedReady to connect
Last event ID: —Last heartbeat: —
⌁No events yet

Connect to the stream to receive published incident events.

0 events

Authenticated audience SSE

The public stream works without an API key. The console supports streaming fetch, named events, replay cursors, deduplication, and heartbeats. News and Buff remain locked until backend authorization is configured. Native browser EventSource cannot set arbitrary headers: never connect it directly with shared audience tokens. Protected audience references provide server-only examples.

Public feed example (no API key)

TERMINAL
curl -N 'https://api.nycalert.ai/v1/feed/stream'
# legacy category stream
curl -N 'https://api.nycalert.ai/v1/incidents/stream?since_id=0'

Browser EventSource

EventSource reconnects automatically, but browsers only dispatch event names with registered listeners. This console uses a streaming fetch parser to observe both default and named events.

JAVASCRIPT
const source = new EventSource(
  'https://api.nycalert.ai/v1/feed/stream'
);
const onEvent = ({ data, lastEventId }) => {
  const e = JSON.parse(data);
  console.log(lastEventId, e.stage, e.title, e.change_summary);
};
source.addEventListener('incident.created', onEvent);
source.addEventListener('incident.updated', onEvent);
source.onerror = () =>
  console.warn('Stream disconnected; EventSource will retry.');
REAL-TIME NEWS

Incident stages & updates

An incident is a story that progresses. Every published revision is a new feed event: its title states where the call stands now, stage places it on the progression, and change_summary says what this update added. All of it is composed by the NYCAlert AI from the radio traffic and validated by code: every claim is bound to a quoted statement and nothing is published that the transmissions do not state.

i

Available on /v1/feed items, /v1/feed/stream, the audience streams, the admin stream and webhook bodies. stage and change_summary are null for an incident's first revision, for revisions published before the revision editor, and while the database view behind them is not deployed.

Stage vocabulary

STAGEMEANINGTYPICAL RADIO BASIS
reportedDispatched, responding or arriving; nothing confirmed on scene.Box transmitted, units responding, 10-84 (arrived).
confirmedUnits confirm the emergency.10-75 (working fire), "we have a fire", smoke or fire showing, people trapped, a confirmed leak.
escalatedMore resources: all hands, a second or higher alarm, mayday."All hands operating", "second alarm transmitted"; each new alarm level is a new revision.
containedThe fire is stopped from extending; not yet under control."Probably will hold", "knocked down", "contained to the gas line".
under_controlThe fire or condition is under control or resolved."Fire is under control", "all hands under control", all occupants removed, the leak secured.
clearingUnits releasing, taking up, returning.10-18, 10-8 for the box, "taking up", a final disposition signal.
closedAll units released; the box is closed."All units 10-8".
otherA real update that does not move the stage (searches, injuries, utilities, a corrected address)."Primary search negative", "two victims being evaluated by EMS", "Con Ed requested".

The stage never moves backwards within an incident unless the AI states a regression explicitly (a rekindle). Acknowledgments, time checks, unit housekeeping and repeats are not published at all.

Rendering updates

  1. Show the newest revision's title as the incident headline; keep summary as the self-contained story so far (it is rewritten, not appended, on every revision).
  2. Render change_summary as the "what's new" line of an update and stage as a badge; is_update distinguishes an update from a new story and first_published_at gives the incident's age.
  3. De-duplicate stream events by event_id and replace an earlier copy when the same event is re-emitted with a larger id (a fuller per-feed breakdown).
  4. Pins: geo.precision address or intersection is a point; box is the FDNY alarm-box area, so draw an uncertainty circle, never an exact address.

Example progression

SSE · /v1/feed/stream
event: incident.created
data: {"incident_id":"INC-1","revision":1,"title":"FDNY Responds to Fire at 2174 Crotona Avenue in the Bronx","stage":null,"change_summary":null,"is_update":false,...}

event: incident.updated
data: {"incident_id":"INC-1","revision":2,"title":"Working Fire Confirmed at 2174 Crotona Avenue in the Bronx","stage":"confirmed","change_summary":"The 10-75 was transmitted, confirming a working fire on the second floor.","is_update":true,...}

event: incident.updated
data: {"incident_id":"INC-1","revision":3,"title":"All Hands Operating for Second-Floor Fire at 2174 Crotona Avenue in the Bronx","stage":"escalated","change_summary":"All hands are operating; the fire is on the second floor of a five-story multiple dwelling.","is_update":true,...}

event: incident.updated
data: {"incident_id":"INC-1","revision":4,"title":"Second Alarm Transmitted for 2174 Crotona Avenue Fire in the Bronx","stage":"escalated","change_summary":"A second alarm has been transmitted.","is_update":true,...}
PARTNERS

Plans & Partner API (paid)

Everything NYC Alert publishes, live and unfiltered, with no caps: the full incident stream, FDNY unit assignments, and the city's building records for the address of every call.

i

Available now for partners. Partner access is a paid plan with a partner key. Contact support@nycalert.ai for partner access.

Plans

PLANWHOWHAT IT INCLUDES
FreeNo keyThe newest public calls only: GET /v1/feed, one page of up to 10, with the headline, borough, time, type and priority (no addresses or map points, no audio), plus the reference lists. Low rate limit. No streams, radio log, audio, timelines, search, history or alarm boxes.
MemberFree key with an NYC Alert accountThe public feed with addresses and map points (up to 25 at a time, the newest 100), the public live stream (one connection), and your own preferences and webhooks. Low rate limit. No Buff or News, no radio log or audio, no timelines, search, history, units or buildings.
Partner (paid)Partner keyEverything, with no caps: every feed (public, Buff, News), the full incident stream, map data, radio log, timelines, search and history, FDNY unit streams and building records. Contact support@nycalert.ai for partner access.

Authentication

Send your partner key on every request from your own server. A missing key is 401; any other key or token is 403. Responses are private and never cached.

HEADER
Authorization: Bearer <partner key>

Incidents

GET/v1/partner/streamEvery published incident event of every feed (public, Buff, News) as Server-Sent Events, the same payload as /v1/feed/stream, with no caps. Optional filters only narrow the stream.

FDNY units

GET/v1/partner/units/streamLive unit assignments (assigned, responding, on scene, released) and alarm signals (10-75, All Hands, 2nd alarm and up, under control) with standard unit codes (E315, L125), box, address and the NYC Alert incident id.
GET/v1/partner/unitsThe same unit and alarm events for the last 48 hours, for polling or backfill after since_id.

Building records

As soon as a call names a street address, NYC Alert fetches the city's records for that exact address and keeps them: use and building class, floors, units, size, year built, open housing violations by class, vacate orders, the fire company area, the owner and managing agent when they are companies, and every source row the city gave. People are never named.

GET/v1/partner/buildingsEvery stored building, newest first. Page with ?limit= (up to 200) and ?before= the next_before of the previous answer.
GET/v1/partner/buildings/incident/{incident_id}The building at the address of one call.
GET/v1/partner/buildings/bbl/{bbl}The buildings on one tax lot (10-digit BBL).
i

Building records come from NYC Open Data (PLUTO, HPD). They are city records, not FDNY building data, and can be old or wrong.

REFERENCE

Errors & validation

The API returns HTTP status codes and response bodies. This portal displays the actual status and body for unsuccessful requests.

STATUSMEANINGCONTRACT
200Successful responseAdvertised for GET operations
304Not modified/v1/feed/geojson with a matching If-None-Match
401Authentication requiredNo credential, or one that does not resolve, on a credentialed route (never downgraded to public)
403ForbiddenA credential of the wrong kind, or a feed the caller is not entitled to
422Validation errorAdvertised for parameterized operations (unknown feed, tag or call_type, a bad bbox)
429Too many requestsRepeated authentication failures from one address; the portal proxy's own per-IP limit
501Not implementedAdvertised for editorial approval
503Unavailable/health/ready when the database or its migration contract is missing; a stream when the connection limit is reached

Other HTTP statuses may be returned, but are not listed as documented OpenAPI responses for every operation.

FastAPI validation response

JSON
{
  "detail": [
    {
      "loc": ["query", "limit"],
      "msg": "Input should be greater than or equal to 1",
      "type": "greater_than_equal"
    }
  ]
}

Validation error shape

TYPESCRIPT
interface ValidationError {
  loc: Array<string | number>;
  msg: string;
  type: string;
  input?: unknown;
  ctx?: Record<string, unknown>;
}

interface HTTPValidationError {
  detail?: ValidationError[];
}
REFERENCE

OpenAPI specification

The live OpenAPI document is the authoritative API contract when the API serves it; it is enabled only on development deployments (API_DOCS_ENABLED). Otherwise this portal documents the v10 contract from its local inventory.

i

Loading the live specification…

Registered operations