Return to API Services
Documentation for /geojson/station_neighbors.py
For a given IEM tracked station, this service provides a GeoJSON representation of the stations that are within a certain distance of the provided station.
Changelog
- 2026-02-14: For IEM consistency, the root attribute generation_time was renamed generated_at.
- 2025-03-05: Initial implementation
Example Usage
Provide neighbors within 25 kilometers of the Ames Airport station.
CGI Arguments
The following table lists the CGI arguments that are accepted by this service. A HTTP GET request is required. Fields of type Multi-Params or CSV value can accept either a comma separated list or multiple parameter and value combinations. For example, ?foo=1&foo=2 is equivalent to ?foo=1,2.
| Field | Type | Description |
|---|---|---|
| callback | string or null | Legacy JSON-P style callback. It is likely best to not depend on this usage. The IEM website has a permissive CORS. |
| network | string (required) | IEM network identifier. Typically a combination of a US state abbreviation and a network classification, ie IA_ASOS. |
| station | string (required) | IEM Station Identifier |
| distance | number | Distance in kilometers to search for neighbors |
| only_online | boolean | Only include online stations |