Documentation for /cgi-bin/afos/retrieve.py
This service returns NWS Text Products from the IEM's database. The database updates in near real-time, so it should be considered a near real-time source with minimal latency.
Changelog
- 2024-03-29: Initial documentation release and migrate to a pydantic schema verification.
Examples
Return all TORnado warnings issued between 20 and 21 UTC on 27 Apr 2011 as a zip file.
https://mesonet.agron.iastate.edu/cgi-bin/afos/retrieve.py?sdate=2011-04-27T20:00Z&edate=2011-04-27T21:00Z&pil=TOR&fmt=zip&limit=9999
Return the last Area Forecast Discussion from NWS Des Moines as text
https://mesonet.agron.iastate.edu/cgi-bin/afos/retrieve.py?pil=AFDDMX
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 |
---|---|---|
center | string | The 4 character source iddentifier to limit the search to. This is typically only used when a PIL is ambiguous |
dl | boolean | If set to 1, the returned data will be downloaded as a file |
edate | string or null | The ending timestamp in UTC to limit the database search. This value is exclusive. |
fmt | string | The format of the returned data, either text, html, or zip. The meaning of text is to return something that resembles what would have been sent over the NWS NOAAPort system. The html format is a bit more human readable. The zip format will return a zip file containing the text products, one file per product. |
limit | integer | The number of products to return, default is 1. This number is limited to 9999. |
pil | Multi-Params or CSV value (required) | The 3 to 6 character AFOS ID / Product ID to query for. This is typically the third line of a NWS Text Product |
sdate | string or null | The starting timestamp in UTC to limit the database search. This value is inclusive. |
ttaaii | string | The 6 character WMO Header to limit the search to. This is typically only used when a PIL is ambiguous |