StarwellAPI documentation

Verified official statistics, one API.

Harmonized series from official statistical agencies. Every observation carries provenance: the exact source URL it came from, when it was retrieved, and by which connector version. Every series carries a verification status backed by golden-value and freshness checks against the live source. Answers are computed by real code in a sandbox, never estimated by a model.

Quickstart Auth and limits Data endpoints POST /answer Verification statuses MCP server Sources and attribution
Quickstart

Two calls to see the whole idea

# 1. The latest US unemployment rate, with provenance on every value:
curl "https://starwell.datastam.ai/api/starwell/v1/sources/fred/series/UNRATE/observations?latest=3"

# 2. A computed, cited answer:
curl -X POST "https://starwell.datastam.ai/api/starwell/v1/answer" \
  -H "Content-Type: application/json" \
  -d '{"question": "What was the average US unemployment rate in 2024?"}'

Base URL: https://starwell.datastam.ai/api/starwell/v1. All responses use { success, data, meta } envelopes. Dates are ISO YYYY-MM-DD.

Auth and limits

Anonymous preview now, API keys for volume

No key is required during the preview: anonymous callers get 120 data requests per minute and 6 answers per 10 minutes, per IP.

API keys (Authorization: Bearer dlk_live_... or X-API-Key) lift you onto daily tier quotas with usage metering. Keys are issued manually during the preview: join the waitlist and mention what you are building.

TierData requests / dayAnswers / day
Anonymous preview120 / minute (IP)6 / 10 minutes (IP)
Free key2,00025
Pro key50,000500
Data endpoints

Read the store

GET/v1/sources

The sources served, with counts, cadence notes, and terms links.

GET/v1/sources/:source/datasets

Datasets (official releases and tables) in one source, with coverage and links to the official table pages.

GET/v1/sources/:source/datasets/:datasetId

One dataset plus its series, each with its verification status. The envelope carries the citation block.

GET/v1/sources/:source/series/:seriesId

Full series metadata, current verification status, and the most recent golden and freshness check records.

GET/v1/sources/:source/series/:seriesId/observations

The values. Parameters: start, end, latest (1..5000), limit, offset. Series are addressed by the ids practitioners already use: fred/UNRATE, statcan/v41690973.

{
  "success": true,
  "data": [
    {
      "period": "2026-06-01",
      "value": 4.2,
      "status": "normal",
      "revision": 1,
      "provenance": {
        "sourceUrl": "https://api.stlouisfed.org/fred/series/observations?series_id=UNRATE&...&api_key=REDACTED",
        "retrievedAt": "2026-07-04T13:38:34.644+00:00",
        "connectorVersion": "1.0.0"
      }
    }
  ],
  "meta": {
    "series": { "externalId": "UNRATE", "indicator": "Unemployment Rate", "unit": "Percent" },
    "verification": { "status": "passing", "lastVerifiedAt": "2026-07-04T13:41:05..." },
    "citation": {
      "source": "Federal Reserve Economic Data (FRED)",
      "dataset": "Employment Situation",
      "url": "https://fred.stlouisfed.org/release?rid=50"
    }
  }
}
The flagship

POST/v1/answer

Ask a question in plain language. The engine matches it to served series (or use series to pin them), materializes the verified observations, writes and executes real Python in a sandbox, and returns the computed result. Nothing in the numbers is model-estimated.

curl -X POST "https://starwell.datastam.ai/api/starwell/v1/answer" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What was the average US unemployment rate in 2024?",
    "series": [{ "source": "fred", "seriesId": "UNRATE" }],
    "start": "2024-01-01", "end": "2024-12-01"
  }'
{
  "success": true,
  "data": {
    "answer": "The average US unemployment rate in 2024 was 4.03%.",
    "chart": { "...": "Plotly figure JSON" },
    "python": "import pandas as pd\ndf = pd.DataFrame(data)\n...",
    "series": [{
      "source": "fred", "seriesId": "UNRATE",
      "verification": { "status": "passing", "lastVerifiedAt": "..." },
      "citation": { "dataset": "Employment Situation", "url": "https://fred.stlouisfed.org/release?rid=50" }
    }]
  },
  "meta": { "observationsUsed": 12, "cached": false, "durationMs": 12085 }
}

Expect 10 to 40 seconds on a cache miss; repeated questions are served from the answers cache in milliseconds and invalidated the moment the underlying official data moves. When no served series can answer, the API refuses honestly with a 422 instead of inventing a number.

Trust, made inspectable

Verification statuses

StatusMeaning
passingGolden-value and freshness checks pass against the live source. Golden values are hand-verified reference points confirmed through two independent delivery channels.
staleValues verify, but the source has published newer data than we currently hold.
failingA golden check disagrees with the live source. The series stays visible and honestly labeled; do not rely on it until it clears.
unverifiedIngested but not yet through the verification harness.
For agents

MCP server

The same capabilities as native tools for any MCP client, served over Streamable HTTP with no session state:

https://starwell.datastam.ai/api/starwell/mcp

Tools: list_sources, list_datasets, get_series, get_observations, answer. Example client configuration:

{
  "mcpServers": {
    "official-statistics": {
      "type": "http",
      "url": "https://starwell.datastam.ai/api/starwell/mcp"
    }
  }
}
Where the numbers come from

Sources and attribution

Statistics Canada

Source: Statistics Canada. Contains information licensed under the Statistics Canada Open Licence. This product is neither produced nor endorsed by Statistics Canada.

FRED, Federal Reserve Bank of St. Louis

This product uses the FRED API but is not endorsed or certified by the Federal Reserve Bank of St. Louis. FRED terms of use.

Values are served as published by the source (current vintage). Revisions are tracked append-only; historical snapshots are on the roadmap as an institutional feature.


Roadmap: /execute (sandboxed Python as a service) and /monitor (alerts on series changes) follow the same contract. Questions, keys, pilots: join the waitlist.