# Brink Earth API — read-only pilot

Base URL after deployment: `https://api-earth.thebrinkworld.com`

All endpoints are GET-only in this pilot. Browser requests must originate from the configured Earth website. No API key is required for the public pilot endpoints; do not treat this as a paid or private customer API.

## Health

`GET /api/health`

Returns service name, status and server timestamp.

## Place search

`GET /api/earth/geocode?mode=search&q=Rotterdam`

Returns `{ place: { label, country_code, lat, lon }, attribution }` when found. Provider: OpenStreetMap Nominatim. Reverse lookup is supported by the source adapter with `mode=reverse&lat=...&lon=...`.

## Global hazards

`GET /api/earth/live-hazards?hazard=all`

Supported hazard values in the retained adapter: `all`, `earthquakes`, `cyclones`, `volcanoes`, `floods`, `droughts`, `wildfires`, `landslides`, `heat`, `plates`.

Some categories require query parameters or configured upstream credentials. A `source_unavailable` or `not_connected` response means the source could not be verified; it must not be presented as an absence of hazard.

For a location-specific earthquake lookup, add `lat`, `lon`, `radius_km` (50–1000), `days` (1–365), and `min_magnitude` (0–9).

## Preliminary spatial baseline

`GET /api/earth/spatial-baseline?lat=51.9244&lon=4.4777`

Latitude is limited to ±85°. Returns terrain and mapped-water observations with status, source/limitations, and timestamp. It does not calculate flood probability, slope stability, seismic design class or engineering suitability.

## Regulatory metadata

`GET /api/earth/regulatory-regimes`

Returns public service-registry metadata, not a live statutory order or legal determination.

## Operational notes

- The retained adapters use public upstream services. Their quotas, availability, attribution and usage policies apply.
- The existing spatial-baseline module explicitly labels public DEM and Overpass endpoints as pilot-only; production scale requires contracted or self-hosted data services.
- No persistence, user accounts, paid API key system, scheduled ingestion or SLA is included yet.
