HRECOS Data Export API
This API provides programmatic access to HRECOS observational data in machine-readable format.
Endpoints
1. Export Data for One or More Sites
GET /api/data/dynserv/hrecos/exportsite/{format}/{sites}/{start}
GET /api/data/dynserv/hrecos/exportsite/{format}/{sites}/{start}/{end}
Path Parameters
| Parameter | Description |
|---|---|
format |
Output format. Must be csv. |
sites |
A single station ID or a comma-separated list of station IDs (e.g. HPOUG,HPORT). |
start |
Start datetime in YYYYmmddTHHMM format. |
end |
(Optional) End datetime in YYYYmmddTHHMM format. If omitted, a single record at start is returned. |
Example
GET /api/data/dynserv/hrecos/exportsite/csv/HPOUG,HPORT/20250101T0000/20250102T0000
2. Export Data for All Sites
GET /api/data/dynserv/hrecos/export/{format}/{start}
GET /api/data/dynserv/hrecos/export/{format}/{start}/{end}
Path Parameters
| Parameter | Description |
|---|---|
format |
Output format. Must be csv. |
start |
Start datetime in YYYYmmddTHHMM format. |
end |
(Optional) End datetime in YYYYmmddTHHMM format. |
Example
GET /api/data/dynserv/hrecos/export/csv/20250101T0000/20250101T1200
Supported Formats
Currently, only the following output format is supported:
- CSV
The {format} path parameter must be set to csv.
Date and Time Handling
- All timestamps use the format:
YYYYmmddTHHMM
Example:
20250115T1345
- By default, timestamps are interpreted as EST year-round (no daylight saving time adjustments).
- The timezone used for interpreting
startandend, and for timestamps in the output, may be overridden using the optionaltimezonequery parameter (see below).
Optional Query Parameters
The following optional GET parameters may be appended to any endpoint.
timezone
Controls both:
- How
startandendtimestamps are interpreted - The timezone used in the output timestamps
Supported Values
EST(default) - Fixed EST year-roundUTCAmerica/New_York
Example
?timezone=UTC
variables
Specifies which data variables to include in the output.
variables=a,b,c
- The value must be a comma-separated list of variable names
- If omitted, all available variables are returned by default
- At least one variable other than
latandlonmust be specified
Requests that only specify lat and/or lon will be rejected.
Example
?variables=wtmp,salt,ph
Notes and Constraints
- Output is always returned as CSV
- Station metadata such as latitude and longitude may be included depending on variable selection
- Requests with invalid date formats, unsupported formats, or invalid variable lists will result in an error response
Example Full Request
GET /api/data/dynserv/hrecos/exportsite/csv/HPOUG/20251201T0000/20251202T2345?timezone=utc&variables=wtmp,salt,ph
Contact / Support
For questions, data issues, or feature requests related to the HRECOS API, please contact the HRECOS data management team.