# USGS on Onekey > 6 endpoints for USGS (6 stable, 0 beta), 1 to 5 credits each. Category: Maps, weather & space. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/usgs Reference (Markdown): https://onekey.dev/docs/api/usgs.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 6 mapped USGS endpoints return each: - `place.lat` (number): 5 - `place.lon` (number): 5 - `content.createdAt` (ISO 8601 date): 4 - `entity.category` (string): 3 - `entity.date` (ISO 8601 date): 3 - `entity.id` (string): 3 - `entity.name` (string): 3 - `content.id` (string): 2 - `content.title` (string): 2 - `content.url` (URL): 2 - `entity.description` (string): 2 - `entity.url` (URL): 2 - plus 12 platform-specific fields under `ext.` ## Endpoints ### usgs.earthquake One USGS earthquake event by id. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/usgs/earthquake?id=us6000jlqa` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): USGS event id - Fields returned: `content.id`, `content.title`, `content.createdAt`, `content.url`, `place.lat`, `place.lon`, `ext.place`, `ext.magnitude`, `ext.depthKm` - Reference: https://onekey.dev/docs/api/usgs/earthquake.md ### usgs.earthquake_count Count of earthquakes at or above a magnitude since a date. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/usgs/earthquake_count?start=2024-01-01` with header `x-api-key: YOUR_API_KEY` - Parameters: - `minmagnitude` (string, optional, default 5): Minimum magnitude - `start` (string, required): Date YYYY-MM-DD - Fields returned: `ext.count`, `ext.maxAllowed` - Reference: https://onekey.dev/docs/api/usgs/earthquake_count.md ### usgs.earthquake_search Search earthquakes (FDSN query): minimum magnitude, newest first. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/usgs/earthquake_search?limit=5&minmagnitude=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `limit` (string, optional, default 20): Rows (1-200) - `minmagnitude` (string, optional, default 4.5): Minimum magnitude - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.url`, `entity.date`, `content.createdAt`, `entity.category`, `place.lat`, `place.lon`, `ext.magnitude`, `ext.magnitudeType`, `ext.significance`, `ext.feltReports`, `ext.tsunami`, `ext.pagerAlert`, `ext.depthKm` - Reference: https://onekey.dev/docs/api/usgs/earthquake_search.md ### usgs.earthquakes Recent earthquakes from a USGS summary feed (e.g. 2.5_day, significant_week). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/usgs/earthquakes?feed=2.5_day` with header `x-api-key: YOUR_API_KEY` - Parameters: - `feed` (string, optional, default 2.5_day): Feed name, e.g. 2.5_day - Fields returned: `content.id`, `content.title`, `content.createdAt`, `content.url`, `place.lat`, `place.lon`, `ext.place`, `ext.magnitude`, `ext.depthKm` - Reference: https://onekey.dev/docs/api/usgs/earthquakes.md ### usgs.earthquakes_near Earthquakes within a radius of a point (FDSN query), newest first. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/usgs/earthquakes_near?lat=35.7&lon=139.7&radius_km=1000&limit=5&minmagnitude=4` with header `x-api-key: YOUR_API_KEY` - Parameters: - `lat` (string, required): Latitude in decimal degrees (-90..90) - `lon` (string, required): Longitude in decimal degrees (-180..180) - `radius_km` (string, optional, default 300): Radius in km (1-20001) - `limit` (string, optional, default 20): Rows (1-200) - `minmagnitude` (string, optional, default 2.5): Minimum magnitude - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.url`, `entity.date`, `content.createdAt`, `entity.category`, `place.lat`, `place.lon`, `ext.magnitude`, `ext.magnitudeType`, `ext.significance`, `ext.feltReports`, `ext.tsunami`, `ext.pagerAlert`, `ext.depthKm` - Reference: https://onekey.dev/docs/api/usgs/earthquakes_near.md ### usgs.streamflow Latest instantaneous streamflow (discharge) for a USGS gauge site. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/usgs/streamflow?site=01646500` with header `x-api-key: YOUR_API_KEY` - Parameters: - `site` (string, required): USGS site number (8-15 digits) - `parameter` (string, optional, default 00060): Parameter code (00060 discharge, 00065 gage height) - Fields returned: `entity.name`, `entity.id`, `entity.category`, `entity.date`, `place.lat`, `place.lon`, `ext.unit`, `ext.value` - Reference: https://onekey.dev/docs/api/usgs/streamflow.md ## Sample request ```bash curl "https://api.onekey.dev/v1/usgs/earthquake?id=us6000jlqa" \ -H "x-api-key: YOUR_API_KEY" ```