Return to API Services

Documentation for /json/cli.py

This service returns atomic daily climate data found in the NWS CLI text products.

Changelog

  • 2025-01-30: Corrected bug in station validation
  • 2024-08-14: Documentation update

Example Requests

Get all daily climate data for Des Moines, IA during 2024

https://mesonet.agron.iastate.edu/json/cli.py?station=KDSM&year=2024&callback=gotData

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.
fmt string The format of the output, either json or csv
station string The 4 character station identifier to query for
year integer Year field.