REST API
The BC Data REST API at api.bcmcp.ca/v1: endpoints, request and response shape, and the OpenAPI document.
Base address: https://api.bcmcp.ca. JSON in, JSON out. Send Content-Type: application/json on every POST. Browsers on any website can call the data endpoints (they allow every origin and send no cookies), but never put a key in a web page.
Endpoints
| Method and path | Key | What it does |
|---|---|---|
GET /v1 | no | Name, version, a link to these docs and the endpoint list. |
GET /v1/sources | no | The same list list_sources gives: every source, whether it is live, and how fresh. Costs 1 unit per call for the caller address, 30 a minute, and is cached for 60 seconds. |
GET /v1/openapi.json | no | The OpenAPI 3.1 document, generated from the same registry as the tools. |
GET /v1/tools | yes | Every tool: name, title, description, cost and input_schema (JSON Schema 2020-12). The same list tools/list gives over MCP, with the same names. |
GET /v1/tools/{name} | yes | One tool. 404 not_found if there is no such tool. |
POST /v1/tools/{name} | yes | Run a tool. The body is its arguments object ({} is fine for a tool with none). |
GET /v1/usage | yes | That key's allowance: what it has used and when each window resets. |
Public, with no key and no /v1 prefix: GET /health, GET /stats.json, GET /status.
Running a tool
curl -X POST https://api.bcmcp.ca/v1/tools/search \
-H "Authorization: Bearer $BCDATA_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"Chilliwack results","domain":"elections"}'The answer is the envelope described in Citations and freshness. It is the same object an MCP client gets in structuredContent, produced by the same code, so REST and MCP never disagree.
Arguments are validated against the tool's schema. A bad argument gets 400 invalid_params and the message says which one. See Errors.
Limits
REST calls draw from the same per-key counter as MCP. See Rate limits.
Every tool
Each tool has its own page under Reference, generated from the registry, with its arguments, cost and a working example.