---
title: "County natural-hazard risk scores for a state + peril (FEMA NRI)"
method: GET
path: "/v1/hazard"
---

# County natural-hazard risk scores for a state + peril (FEMA NRI)

`GET /v1/hazard`

## Request

- Base URL: `https://api.querylines.com`
- URL: `https://api.querylines.com/v1/hazard`
- Auth: none declared

Returns each county in `state` with its FEMA National Risk Index figures for `peril` -- Expected Annual Loss (USD), the EAL and Risk Index relative scores (0-100) and ratings -- ordered by expected annual loss (descending). `peril` defaults to 'composite' (all hazards); pass a slug like 'wildfire', 'coastal_flood', 'hurricane', 'earthquake'. `county` is the surplus-lines premium spelling where a crosswalk exists (null otherwise). Modeled chronic risk, not an insured-loss figure. $0.10 per query.

## Query parameters

- `state` string, required
- `peril` string
- `limit` integer

## Response `200`

Counties for the state + peril, highest expected annual loss first.

- object
  - `state` string, required
  - `peril` string, required
  - `count` number, required
  - `counties` object[], required
    - `county` string, nullable, required: Normalized to premium spelling; null if uncrosswalked.
    - `county_name` string, required: Raw NRI county name, e.g. 'Miami-Dade'.
    - `fips` string, required: 5-digit state+county FIPS, e.g. '12086'.
    - `eal_total` number, nullable, required: Expected Annual Loss, USD.
    - `eal_score` number, nullable, required: EAL relative score 0-100; null for composite.
    - `eal_rating` string, nullable, required: e.g. 'Very High'; null for composite.
    - `risk_score` number, nullable, required: Risk Index score 0-100.
    - `risk_rating` string, nullable, required
    - `population` number, nullable, required
    - `sovi_rating` string, nullable, required: Social Vulnerability rating.
  - `report_date` string, nullable, required
  - `data_as_of` string, nullable, required
  - `source` string, nullable, required
  - `coverage_note` string, required

## Other responses

- `400`: Invalid query parameters.
- `402`: Payment required (x402). Returned when the x402 payment gate is enabled (PAY_TO_ADDRESS configured) and the request carries no valid payment. The full payment challenge (price/network/payTo/asset) is carried in the base64-encoded PAYMENT-REQUIRED response header (see the x402 spec), not the JSON body -- the body is `{}` for API clients. Price for this route: $0.10. Retry with a signed payment per x402 (USDC on Base mainnet); on success the response carries a PAYMENT-RESPONSE header with settlement info. When PAY_TO_ADDRESS is unset (kill switch off), this route is free and never returns 402.
- `500`: Internal error.

---

[API](https://skmtc.dev/querylines/apis/querylines-api.md) · [All operations](https://skmtc.dev/querylines/apis/querylines-api/llms.txt) · [OpenAPI document](https://skmtc.dev/querylines/apis/querylines-api/revisions/4afb6c3e2b1f?raw)
