---
title: "Well depth and water-table statistics around a coordinate"
method: GET
path: "/api/well-depth-lookup"
tags: ["Well data"]
---

# Well depth and water-table statistics around a coordinate

`GET /api/well-depth-lookup`

## Request

- Base URL: `https://drillerdb.com`
- URL: `https://drillerdb.com/api/well-depth-lookup`
- Auth: none declared

Returns well-depth and static-water-level (water table) statistics computed from recorded wells near a US coordinate, plus a sample of the nearest wells. Public, no key. Rate limited per IP; responses are cached for up to six hours. Locations outside the United States are rejected.

## Query parameters

- `lat` number, required
- `lng` number, required

## Response `200`

Statistics for the area; an insufficient_data body (still 200) when too few wells are recorded nearby to estimate; or a too_many_wells body (still 200) when the area has so many recorded wells that the statistics could not be computed in time.

- union
  - WellDepthResult
    - `well_count` integer, required: Recorded wells inside the radius.
    - `swl_count` integer, required: Of those, wells with a static water level.
    - `radius_km` number, required
    - `radius_mi` number, required
    - `expanded_radius` boolean, required: True when the search widened to find enough wells.
    - `depth_unit` 'ft', required
    - `depth_min` number, nullable, required
    - `depth_max` number, nullable, required
    - `depth_p25` number, nullable, required
    - `depth_p50` number, nullable, required: Median well depth, feet.
    - `depth_p75` number, nullable, required
    - `has_swl` boolean, required
    - `swl_p25` number, nullable, required
    - `swl_p50` number, nullable, required: Median static water level (water table), feet below ground.
    - `swl_p75` number, nullable, required
    - `top_aquifer` string, nullable, required
    - `nearby` NearbyWell[], required
      - `distance_mi` number, nullable, required
      - `depth_ft` number, nullable, required
      - `swl_ft` number, nullable, required: Static water level below ground, feet.
      - `yield_gpm` number, nullable, required
      - `year` integer, nullable, required
      - `county` string, nullable, required
    - `cached_at` string, date-time, required
  - WellDepthInsufficientData: Returned with status 200 when too few wells are recorded near the point.
    - `well_count` 0, required
    - `error` 'insufficient_data', required
    - `reason` 'oil_gas_only' | 'non_water_supply_only': Present when well records exist near the point but none is a water-supply well, so no water-well estimate is possible: oil_gas_only when every record is an oil or gas well, non_water_supply_only when every record is an oil or gas, monitoring, test or other non-water-supply well.
    - `message` string, required
  - WellDepthTooManyWells: Returned with status 200 when the area has so many recorded wells that the statistics query ran past its time limit. No statistics are returned.
    - `error` 'too_many_wells', required
    - `message` string, required

## Other responses

- `400`: lat/lng missing or not numbers, or outside the United States.
- `429`: Too many requests from this IP address. Wait the number of seconds in Retry-After.
- `500`: The lookup failed; retry.

---

[API](https://skmtc.dev/drillerdb/apis/drillerdb-public-apis.md) · [All operations](https://skmtc.dev/drillerdb/apis/drillerdb-public-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/drillerdb/apis/drillerdb-public-apis/revisions/aeb372774d99?raw)
