Skip to main content
Tutorial

Earthquake, Hurricane and Wildfire Data APIs for Agents

Query USGS earthquakes, National Hurricane Center storm feeds and USFS wildfire risk from one API key, so a risk agent can answer with official data.

fastcrw
By RecepNovember 17, 20265 min read

By the fastCRW team · Catalogue figures checked 2026-11-05 against GET /v1/data · Verify independently before relying on any figure.

A hazard agent needs three answers before it can say anything useful: what has just happened near a place, whether a storm is forming, and how exposed the area is to wildfire. Pergamon exposes official feeds for each. usgs covers earthquakes, nhc covers the National Hurricane Center, wildfirerisk covers USFS wildfire risk, and usastructures covers FEMA's USA Structures building footprints. One API key reaches all four.

Earthquakes near a point

usgs/query filters the USGS catalogue by time, magnitude and radius. The call below asks for events of magnitude 2.5 or more within 300 km of San Francisco since 2026-10-01.

curl "https://api.fastcrw.com/v1/data/usgs/query?starttime=2026-10-01&minmagnitude=2.5&latitude=37.77&longitude=-122.42&maxradiuskm=300&limit=3" \
  -H "Authorization: Bearer $CRW_API_KEY"

Real output, three events from the response's features array:

mag 2.79, 8 km E of Lower Lake, CA
mag 2.51, 8 km E of Lower Lake, CA
mag 2.71, 7 km NW of The Geysers, CA

Each feature is GeoJSON, and properties holds mag, place and time. time is milliseconds since the Unix epoch, so convert it before you show it to a person. Without a point, the same call returns events worldwide: at check time a magnitude 5.1 event in Tanzania led the list.

Each feature also has a root-level id, the USGS event ID, such as nc75461677. Store it. An agent that polls the feed every few minutes can use it to skip events it has already handled, and to notice when USGS revises an event it has already seen.

Storms: the National Hurricane Center

nhc/active-storms lists the storms that are active now. nhc/forecast-cone returns the forecast cone, and returnGeometry=false drops the shape when you only need the metadata.

curl "https://api.fastcrw.com/v1/data/nhc/active-storms" \
  -H "Authorization: Bearer $CRW_API_KEY"

On 2026-11-05 both calls returned empty results, and the storm list was {"activeStorms": []}. An empty answer is the normal result when no storm is active. It is not an error, so give your agent an explicit branch for it. The nhc provider has 32 capabilities in total, including forecast-track, wind-probabilities-34kt and past-track, and you call them the same way.

Wildfire burn probability at a point

wildfirerisk/fsim-burn-probability takes a geometry option. It must be JSON that includes a spatialReference. The example below uses WGS 84 (wkid 4326) and was run live with the Python SDK (crw 0.41.0).

# pip install crw
from crw import CrwClient

client = CrwClient()  # reads CRW_API_KEY
fire = client.get_data("wildfirerisk", "fsim-burn-probability", {
    "geometry": '{"x": -120.5, "y": 38.9, "spatialReference": {"wkid": 4326}}',
})
print(fire["data"]["value"])

Real output: 5000.

The spatialReference is not optional. The same point sent as {"x":-120.5,"y":38.9} is read as Web Mercator metres and returns "value": "NoData". When you get NoData, check the spatial reference first, and do not read it as a sign that the area is safe.

This post does not state a unit for the value. Show the raw number, and point readers to the dataset documentation, which Pergamon returns through the dataset-documentation capability. The wildfirerisk provider has 90 capabilities, and its terms are set per dataset, not once for the whole provider. Read the licence field of the dataset you use.

Structures near a point

usastructures/footprints-near-point returns building footprints within a distance of a point. distance is in metres. The call below looks within 100 m of a point in San Francisco and returned 7 features.

curl "https://api.fastcrw.com/v1/data/usastructures/footprints-near-point?longitude=-122.42&latitude=37.77&distance=100" \
  -H "Authorization: Bearer $CRW_API_KEY"

Each feature is one building footprint, a building outline with its own OBJECTID. Its properties carry fields such as OCC_CLS, PRIM_OCC, PROP_CITY and HEIGHT. The provider also has count and bounding-box capabilities, such as count-in-bbox, which answer "how many" without downloading every footprint. Check their options with find before you build on them.

Footprint fields come from the source layer as published. Do not treat an occupancy code as a verified fact about a particular building. The layer's licence statement, returned in provenance, reads: "This work is licensed under a Creative Commons by Attribution (CC BY 4.0) license. See Credits and Map for Attribution." Show that attribution wherever you show the footprints.

What each feed does and does not answer

CapabilityAnswersDoes not answer
usgs/queryWhich earthquakes were recorded near a point, with magnitude, place and timeWhether a building was damaged, or whether another event is coming
nhc/active-stormsWhich storms are active nowWhat a storm will do at a specific address
wildfirerisk/fsim-burn-probabilityThe raw burn-probability value at a point in the USFS layerThe unit of that value, or whether an area must be evacuated
usastructures/footprints-near-pointWhich building footprints lie within a distance of a pointReplacement value, insurance value or verified occupancy

Put the right column into the agent's instructions. A model that reads only the left column tends to answer more than the data supports.

A risk-at-this-address sketch

Pergamon returns the raw values. It does not return a risk score, and your agent should not invent one. A workable flow:

  1. Turn the address into a latitude and longitude with your own geocoder.
  2. Call usgs/query for recent events within a radius you choose.
  3. Call nhc/active-storms and branch on an empty list.
  4. Call wildfirerisk/fsim-burn-probability with the point and its spatialReference.
  5. Call usastructures/footprints-near-point and count the buildings found.
  6. Write the answer from those values only, with the attribution_text of each source next to the figure it supports.

One run of this flow makes four server calls (the storm check, the earthquake query, the burn probability and the structures query), so it costs four credits. Add the calls you make for each extra address, and cache the results for the places you check often.

Limits

  • These feeds are inputs to a decision, not a rating of a property or a region.
  • Earthquake records can change after they are first published, because magnitudes and locations get revised. Query again before a decision that depends on them.
  • Storm feeds are empty outside active storms. An empty result does not mean the risk is zero.
  • This is not emergency advice. For warnings that affect life or property, use the official alert channels of the agency responsible.

Sources

Related: weather.gov API in Python · Can you use public API data commercially? · Public data API for AI agents · Pergamon catalogue

Browse the hazard sources on Pergamon

FAQ

Frequently asked questions

Do I need a USGS or NOAA key?
No. These are server sources, so Pergamon makes the call and you need no key of your own. Each call costs 1 credit, and a failed call is not billed.
Why does my wildfire call return NoData?
The geometry has no spatialReference, so the point is read in the wrong coordinate system. Add the spatial reference {"wkid": 4326} to the geometry JSON.
Is the wildfire value a risk score?
It is the raw value from the USFS layer. This post does not convert it or state a unit for it. Read the dataset documentation for the layer before you interpret the number.

Get Started

Try fastCRW free

Run a live request in the playground — no signup required. Or grab a free API key with 500 credits, earn up to 500 more, no credit card.

Continue exploring

More tutorial posts

View category archive