The Canadian PressData Hub
demo, public sample content
For developers

Developer reference

The same products through a REST API and an MCP server. One key per subscription; the licence and the meter travel with the call.

Endpoints

Method and pathWhat it doesMetered as
GET /v1/productsThe catalogue with rate plansno
GET /v1/meYour subscriptions, scopes and pricesno
POST /v1/answerGrounded answer with citations inside your product's scope1 call
POST /v1/searchTitles, dates, rights and excerpts1 call
GET /v1/articles/{id}One story within your display rights1 excerpt
POST /v1/policy-traceStories per year and section for a keyword1 call
GET /v1/latestNewest items in scope1 call
GET /v1/browseCounts by topic, region, year and language; a filtered list of items1 call when filtered
GET /v1/usageYour usage this monthno

Interactive reference: Swagger UI · OpenAPI document

Authentication

Send your subscription key in the X-API-Key header. Keys map to a client, a product and a plan on the server; the scope filter is never accepted from the client.

Sandbox keys (demo only)

Licence terms on responses

  • Attribution line must be kept with the content.
  • No training on returned content.
  • Display as returned: excerpt or full text by product.
  • Subscriptions can be switched off; a 401 means the licence is paused.

REST example

curl -X POST "$HUB/v1/answer" \
  -H "X-API-Key: demo-munk-91d0c7" \
  -H "Content-Type: application/json" \
  -d '{"question":"What was reported about Toronto transit?","product_id":"archive_research"}'

Python

import requests
r = requests.post(f"{HUB}/v1/answer",
    headers={"X-API-Key": "demo-munk-91d0c7"},
    json={"question": "What was reported about Toronto transit?"})
for s in r.json()["references"]:
    print(s["title"], s["publish_date"], s["rights"], s["attribution"])

MCP (any AI tool)

Endpoint . Six tools: list_my_products, answer_news_question, search_news, get_article, policy_trace, latest_items.

Gemini CLI (settings.json)

{ "mcpServers": { "cp-data-hub": {
    "httpUrl": "https://<hub>/mcp",
    "headers": { "X-API-Key": "demo-munk-91d0c7" } } } }

Claude Desktop

{ "mcpServers": { "cp-data-hub": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://<hub>/mcp",
             "--header", "X-API-Key:demo-munk-91d0c7"] } } }

Rate plans