Docs / REST API

REST API

The same data as the MCP tools, over plain HTTPS with an API key from the app, passed as a bearer token or an x-api-key header - for curl, scripts, and jobs. Rate limits are on the shared reference page; errors are below.

GET /v1/pressure/latest

The newest closed UTC day's reading on the 0-5 scale. The in-progress day is never served here.

Query

Responses cache for five minutes; a repeated call inside that window costs nothing new.

request
$ curl https://api.pressureatlas.com/v1/pressure/latest \
    -H "Authorization: Bearer pa_your_key"
response 200
{
  "date": "2026-08-19",
  "pressure": "3.2",
  "label": "building",
  "dataset": "macro",
  "dataset_name": "Macro (Global)"
}

GET /v1/pressure/recent

The most recent 5 closed days of readings - the same tape as the public feed, counted against your account's daily budget.

Query

  • dataset - defaults to macro.
  • date_start, date_end - YYYY-MM-DD, validated and accepted; every account currently receives the fixed recent window, and the response carries a note when dates were passed.
request
$ curl "https://api.pressureatlas.com/v1/pressure/recent?date_start=2026-08-13" \
    -H "Authorization: Bearer pa_your_key"
response 200
{
  "dataset": "macro",
  "window": { "start": "2026-08-15", "end": "2026-08-19" },
  "notes": [
    "Your access includes the most recent 5 days of pressure; the requested window was ignored."
  ],
  "readings": [
    { "date": "2026-08-15", "pressure": "2.6", "label": "equilibrium" },
    { "date": "2026-08-16", "pressure": "2.9", "label": "equilibrium" },
    { "date": "2026-08-17", "pressure": "3.1", "label": "building" },
    { "date": "2026-08-18", "pressure": "3.4", "label": "building" },
    { "date": "2026-08-19", "pressure": "3.2", "label": "building" }
  ]
}

GET /v1/metrics/:slug/latest

Every metric in the catalog other than Pressure is read here, by its slug from /v1/datasets (the catalog names the path for each row under read_with). The reading is on that metric's own scale and the value field is named after the metric.

Also

  • /v1/metrics/:slug/recent - daily readings for a window; date_start, date_end as for /v1/pressure/recent.
  • /v1/metrics/:slug/export - the full history as format=csv or format=json, on accounts with export.

When the metric carries an explanation, the latest reading includes it as plain text.

response 200
{
  "date": "2026-08-19",
  "drift": "6.20",
  "label": "mid",
  "dataset": "drift",
  "dataset_name": "Drift",
  "explanation": "Smoothed over two weeks."
}

GET /v1/datasets

The catalog with your access per dataset. The full catalog is always visible. Each row names the path that serves it (read_with) and carries the metric's explanation when one is set.

response 200
{
  "datasets": [
    {
      "slug": "macro",
      "name": "Macro (Global)",
      "description": "Pressure: a daily measurement ...",
      "read_with": "/v1/pressure",
      "history_start": "2021-04-01",
      "your_access": "the most recent 5 days of pressure",
      "export": false
    }
  ]
}

Errors

REST errors are standard HTTP with one JSON body shape.

StatusCodeWhen
401unauthorizedMissing, invalid, or revoked key.
400invalid_request, invalid_windowBad date format, start after end, window before history.
403not_availableA dataset or feature outside your account's access.
404unknown_dataset, wrong_routeSlug not in the catalog; or the slug exists but is served by the other path (the message names it).
429rate_limitedPer-minute or daily budget spent; Retry-After is set.
503upstream_unavailable, data_pendingThe data source is unavailable, or the newest day is still preparing.
error body
{
  "error": {
    "code": "rate_limited",
    "message": "You've used the 200 calls included today. The counter resets at midnight UTC."
  }
}