# nearest_usgs_gage_id

> Identifier (USGS-########) of the nearest active USGS stream gage within 10 km that reported a daily-mean discharge in the last 7 days.

Source: https://docs.invariant-ai.com/fields/nearest_usgs_gage_id

|  |  |
| --- | --- |
| Name | `nearest_usgs_gage_id` |
| Layer | utilities |
| Type, unit | string, none |
| Sources (in order) | `USGS_WATERDATA` |
| Cache | 1 day (`ttl_seconds` 86400) |

## What it is

Identifier (USGS-########) of the nearest active USGS stream gage within 10 km that reported a daily-mean discharge in the last 7 days.

## Nulls

status "absent": no active stream gage with a daily-mean discharge report in the last 7 days within 10 km. "failed": the USGS Water Data API did not answer or returned more pages, a record is not discharge/daily-mean/ft^3/s, two gages are equally near, or a gage reports different values for its latest day.

## Example

```bash
curl -s https://api.invariant-ai.com/v1/fetch \
  -H "X-API-Key: $INVARIANT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lat": 39.0438, "lng": -77.4874, "fields": ["nearest_usgs_gage_id"]}'
```

Field object keys are described in [Responses](https://docs.invariant-ai.com/responses). Live definition: [`GET /v1/meta/fields`](https://docs.invariant-ai.com/api/meta-fields).
