CRED API

A read API over Canadian economic data. No key required for reads. Responses are JSON. Observations come from the same 24h-cached live fetch as the charts, so each series is pulled from its source at most once per day.

GET/api/series?q=cpi

Search the series registry by ID, title, or description. Omit q to list all series.

Request

curl "https://cred.nshipyard.com/api/series?q=cpi"

Response

[
  {
    "id": "CPI_CA",
    "title": "Consumer Price Index, All-items",
    "source": "statcan",
    "sourceLabel": "Statistics Canada, Consumer Price Index",
    "tableId": "18-10-0004-01",
    "units": "Index",
    "frequency": "Monthly",
    "category": "prices",
    "description": "The all-items Consumer Price Index..."
  }
]
GET/api/series/UNRATE_CA

Full metadata for one series, including its StatCan table or BoC Valet mapping.

Request

curl "https://cred.nshipyard.com/api/series/UNRATE_CA"

Response

{
  "id": "UNRATE_CA",
  "title": "Unemployment Rate",
  "source": "statcan",
  "sourceLabel": "Statistics Canada, Labour Force Survey",
  "tableId": "14-10-0287-01",
  "vectorIds": [2062815],
  "units": "Percent",
  "unitsDetail": "Seasonally Adjusted",
  "frequency": "Monthly",
  "category": "population-employment-labour",
  "description": "...",
  "lastVerified": "2026-10-09"
}
GET/api/observations?series=UNRATE_CA&from=2020-01-01&to=2026-09-01

Observations for a series, ascending by date. from and to are optional ISO dates.

Request

curl "https://cred.nshipyard.com/api/observations?series=UNRATE_CA&from=2020-01-01&to=2020-04-01"

Response

{
  "series": "UNRATE_CA",
  "observations": [
    { "date": "2020-01-01", "value": 5.5 },
    { "date": "2020-02-01", "value": 5.6 },
    { "date": "2020-03-01", "value": 7.8 },
    { "date": "2020-04-01", "value": 13.0 }
  ],
  "source": "Statistics Canada, Labour Force Survey",
  "cached": true,
  "asOf": "2026-10-09T12:00:00.000Z"
}
GET/api/categories

The 8 top-level categories with live series counts from the registry.

Request

curl "https://cred.nshipyard.com/api/categories"

Response

[
  {
    "slug": "prices",
    "name": "Prices",
    "seriesCount": 1,
    "examples": ["Consumer Price Index, All-items"]
  }
]
GET/api/vintages?series=UNRATE_CA

List daily snapshot dates for a series from the vintage archive (Phase 2). Each snapshot holds the full observation history as published that day, so revisions can be compared. Snapshots accumulate daily once the archive's Blob storage is connected.

Request

curl "https://cred.nshipyard.com/api/vintages?series=UNRATE_CA"

Response

{
  "series": "UNRATE_CA",
  "snapshots": ["2026-10-11", "2026-10-10", "2026-10-09"]
}

MCP Connector

The MCP server exposes CRED to AI agents over streamable HTTP (JSON-RPC 2.0). It is live at /mcp and backed by the same registry and observation proxy as the REST API, so tools never drift from the site. The get_observations tool accepts the same unit transforms and frequency aggregation as the series page charts (transform and frequencyarguments), applied before the 500-point cap. Pick your client below and copy the config.

MCP endpoint

https://cred.nshipyard.com/mcp

Claude Desktop: paste into Settings → Connectors (or claude_desktop_config.json)

{
  "mcpServers": {
    "cred": {
      "url": "https://cred.nshipyard.com/mcp"
    }
  }
}
search_series

Search series by keyword across titles, descriptions and IDs. Argument: query (string).

get_observations

Get date/value observations for a series ID. Arguments: series (string), from? (YYYY-MM-DD), to? (YYYY-MM-DD), transform? (levels, change, change_yoy, pct_change, yoy, index, log), frequency? (native, quarterly, annual). Transforms apply before the 500-point cap; the response echoes the applied transform, frequency, and any note (e.g. points omitted by the log transform).

list_categories

List the eight data categories with series counts. No arguments.

Embed a Graph

Any series page has a Share Graph button with an Embed in Website option. It generates a link to a standalone chart page (/graph/?g=…) that carries the series, range mode, and range in a base64url config, and an <iframe> snippet pointing at it. The embedded chart is the same figure as the series page: CRED logo, axes, recession shading, and source line, with no site chrome.

Fixed size

<iframe src="https://cred.nshipyard.com/graph/?g=CONFIG" width="100%" height="480" frameborder="0" title="Series title | CRED" loading="lazy"></iframe>

Responsive

<div style="position:relative;padding-bottom:62.5%;height:0;overflow:hidden;max-width:100%;">
  <iframe src="https://cred.nshipyard.com/graph/?g=CONFIG" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;" title="Series title | CRED" loading="lazy"></iframe>
</div>

Replace CONFIG with the config from the series page's Share Graph dialog. Range modes: full (series start to latest, auto-updating), lastN (last N periods, auto-updating), static (fixed from/to). Attribution is built into the embedded chart; keep the source line visible.