REST API
Page anonymous Atlas collections and handle errors, caches, and versions.
Send GET requests to https://api.onehealthatlas.org under /v1. No API key is used. See the OpenAPI schema and the API reference.
Interpret with care
Atlas results are not a diagnosis. Atlas results are not an estimate of an individual's risk. See Evidence, provenance, and uncertainty.
Read collections and resources
, measures, observations, and sources
return data, meta, and links. One indicator, measure, source, or
returns data. Legacy routes use
their own schemas.
{
"data": [],
"meta": { "next_page_token": null, "response_at": "2026-01-01T00:00:00Z" },
"links": { "self": null }
}That JSON is the contract's illustrative empty page. A null links.self can appear while data contains rows. A null self does not mean the page failed.
Page through results
page_size defaults to 100, with a minimum of 1 and a maximum of 500. page_size=0 on observations returns HTTP 400 INVALID_REQUEST. The errors entry says the value must be at least 1.
Send meta.next_page_token back as with the other parameters unchanged. The token is opaque, bound to the query and the , and it can expire on restart. null means the collection is exhausted. A page token is not a citation and not a release id.
A sample GET /v1/indicators?page_size=2 returned two indicators, then the next two with that page_token. A sample nclimgrid_tavg_county_day query for county 36061, year 2025, and page_size 2 returned 2025-01-01 and 2025-01-02, then 2025-01-03 and 2025-01-04. page_token alone returned HTTP 400 INVALID_REQUEST and detail One or more request values are invalid. because measure_id, geography_type, and geography_id were missing. Those three filters without a year returned detail Supply a year or both start_date and end_date.
Do not invent a token.
url='https://api.onehealthatlas.org/v1/observations?measure_id=nclimgrid_tavg_county_day&geography_type=county&geography_id=36061&year=2025&page_size=2'
first=$(curl -fsS "$url")
token=$(printf '%s' "$first" | python3 -c 'import json,sys,urllib.parse; token=json.load(sys.stdin)["meta"]["next_page_token"]; print("" if token is None else urllib.parse.quote(token, safe=""))')
if [ -n "$token" ]; then
curl -fsS "$url&page_token=$token"
fiHonor rate limits
429 and 503 can include Retry-After. No numeric quota, concurrency cap, or fixed range is published. Wait, then retry. Keep request_id. Rules: Errors and retries.
Handle errors
Canonical errors use RFC 9457 application/problem+json. Required fields: type, title, status, detail, instance, request_id. Optional: code, and errors as objects. Codes, HTTP 413, HTTP 414, HTTP 422, and retries: Errors and retries.
Tell versions apart
| Identifier | Where | What it names |
|---|---|---|
/v1 | URL path | HTTP contract. Breaking changes need a migration plan. V1 may add fields |
OpenAPI info.version | Schema document | Application version, separate from /v1 |
semantic_version | Indicator, measure, observation, source, methodology | Semantic contract version |
release_id | Observation | Row release. Different releases are not directly comparable |
release_version | Indicator, measure, source, methodology | Current-release relationship |
methodology_version | Observation | Transformation version |
Methodology version | Methodology resource | Resource version, distinct from methodology_version |
These routes read the current release. The same URL can return a different release_id later. Save the response, or a checksum, with the request URL.
Cache and revalidate
Discovery responses use Cache-Control: public, max-age=60, must-revalidate, including a sample indicators response. Send the detail ETag as If-None-Match for HTTP 304 and an empty body. GET /v1/sources/human did that.
Legacy metadata uses a 300-second public cache. That ETag does not implement conditional 304. meta.response_at is the response time. The response time shows when Atlas built the response. It does not show when the publisher last updated the data.
Last updated on