One API key.
207 Canadian government data modules. Every response cited.
Get an API key, make your first call, and see the citation contract — in under 5 minutes.
$ curl -s https://api.maplespike.ca/v1/gov/search \
-H "X-API-Key: ms_live_..." \
-G -d "query=housing" \
-d "jurisdiction=federal" \
-d "_limit=2" | jq .
{
"success": true,
"data": { "releases": [...] },
"citation": {
"source_name": "open.canada.ca",
"data_hash": "sha256:a1f3...",
"license": "OGL-C"
}
}
_mock=true for sample data with no upstream hit. Multiple ways to authenticate
Four authentication methods, one JWT token format. All methods issue the same JWT — pick the one that fits your use case.
API Key (recommended for servers)
Create a key from the signup, then send it as the X-API-Key :
OAuth (recommended for web apps)
Sign in with GitHub, Google, or any OIDC provider:
$ curl https://api.maplespike.ca/v1/auth/oauth/providers
Web3 Wallet
Sign a SIWE (EIP-4361) message with your wallet:
Passkey / FIDO2
Register a passkey (Touch ID, Windows Hello, YubiKey):
All methods issue JWTs with the same format. Use the token as a Bearer header or session cookie. Keys are hashed with SHA-256 at rest.
One envelope. Every endpoint.
Every response carries the same structure — data, quality score, citation metadata, and usage info. Your agent always knows where the answer came from.
"success": true,
"data": { /* structured payload */ },
"quality": {
"freshness_seconds": 47,
"confidence": "high",
"certainty_score": 0.923
},
"citation": {
"source_name": "open.canada.ca",
"source_url": "https://...",
"data_hash": "sha256:a1f3...",
"license": "OGL-C"
}
}
REST endpoints
| Method | Path | Description |
|---|---|---|
| GET | /v1/health | [object Object] |
| GET | /v1/openapi.json | [object Object] |
| GET | /v1/me | [object Object] |
| GET | /v1/usage | [object Object] |
| GET | /v1/gov/releases | [object Object] |
| GET | /v1/gov/search?query= | [object Object] |
| GET | /v1/citation/:hash | [object Object] |
| GET | /v1/signals | [object Object] |
| POST | /v1/ai/ask | [object Object] |
| POST | /v1/ai/search | [object Object] |
| GET | /v1/ai/models | [object Object] |
| POST | /v1/ai/analyze | [object Object] |
| POST | /v1/register | [object Object] |
| GET | /v1/verify/:token | [object Object] |
| POST | /v1/auth/refresh | [object Object] |
| POST | /v1/auth/logout | [object Object] |
| GET | /v1/keys | [object Object] |
| POST | /v1/keys | [object Object] |
| DELETE | /v1/keys/:id | [object Object] |
| POST | /v1/keys/:id/rotate | [object Object] |
| POST | /v1/billing/checkout | [object Object] |
| GET | /v1/billing/plans | [object Object] |
| GET | /v1/extraction/tasks | [object Object] |
| POST | /v1/extraction/results | [object Object] |
| GET | /v1/extraction/cached/:source_id | [object Object] |
Edge AI — ask, search, analyze
AI endpoints run on the Cloudflare edge (Llama 3.3 70B) with automatic fallback to the homelab cluster (Qwen 3.5 27B). Tier-aware routing: free tier uses edge first, pro/business uses homelab first, enterprise uses BYOK if configured.
POST /v1/ai/ask
Ask a natural language question about Canadian government data. The response includes the answer, model used, inference source (edge/homelab/byok), and token usage.
-H "Content-Type: application/json" \
-H "X-API-Key: ms_live_..." \
-d '{
"question": "What did the ethics commissioner investigate in 2024?",
"model": "fast"
'} | jq .
// Response
{
"success": true,
"data": {
"answer": "The Ethics Commissioner investigated...",
"model": "@cf/meta/llama-3.1-8b-instruct",
"source": "edge",
"tokens": { "prompt": 142, "completion": 89 },
"cached": false
},
"meta": { "tier": "free", "rate_limit_remaining": 9 }
}
Optional context field injects up to 2000 chars of MapleSpike data into the system prompt. Use model: "fast" for Llama 3.1 8B (lower latency), omit for Llama 3.3 70B (higher quality).
POST /v1/ai/search
Semantic search using edge-generated embeddings (BGE base) routed to the homelab Qdrant vector database. Falls back to keyword search if embedding generation fails.
-H "Content-Type: application/json" \
-H "X-API-Key: ms_live_..." \
-d '{
"query": "regulatory impacts on small business",
"limit": 10
'} | jq .
// Response
{
"success": true,
"data": { "results": [...] },
"meta": { "source": "vector-edge-embedding" }
}
Max limit is 50. If the embedding service is unavailable, the API falls back to keyword search via /v1/gov/search and returns meta.source: "keyword-fallback".
POST /v1/ai/analyze (Pro tier+)
Submit a document or transcript for LLM-powered analysis. The model extracts key topics, notable entities, and an overall summary. Optionally specify a mode (e.g. "general", "legal", "financial") to hint the analysis focus. Defaults to "general" if omitted.
-H "Content-Type: application/json" \
-H "X-API-Key: ms_live_..." \
-d '{
"text": "Mr. Speaker, today I am pleased to table Bill C-59...",
"mode": "general"
'} | jq .
// Response
{
"success": true,
"data": {
"analysis": "Key Topics: 1) Budget implementation 2) Competition Act amendments...\n\nEntities: Bill C-59, Competition Bureau, Innovation Ministry...\n\nSummary: The speech introduces amendments to...",
"model": "qwen3.5-4b-local",
"mode": "general"
}
}
Unlike /v1/ai/ask and /v1/ai/search which run directly on the Cloudflare edge, this endpoint is proxied to the homelab API server (Qwen 3.5). Requires Pro tier or higher (returns 402 UPGRADE_REQUIRED on Free). Max text length: 50,000 chars (first 8,000 chars are sent to the LLM). If the AI Gateway is unreachable, returns 503 AI_UNAVAILABLE.
GET /v1/ai/models
List available models and tier-aware routing rules. Public endpoint — no API key required.
// Response
{
"success": true,
"data": {
"edge": {
"chat": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"chatFast": "@cf/meta/llama-3.1-8b-instruct",
"embedding": "@cf/baai/bge-base-en-v1.5"
},
"homelab": "qwen3.5-27b",
"routing": {
"free": "edge (within budget) → homelab fallback",
"pro": "homelab primary → edge fallback",
"enterprise": "byok (if configured) → homelab fallback"
}
}
}
Extract data from no-API government portals
Some government portals (NWT, Nunavut) have no machine-readable API. The extraction system lets the portal client render pages in the user's browser, extract download links, and cache results server-side for MCP tools to use as fallback.
GET /v1/extraction/tasks
List extraction tasks for sources that need browser rendering. Optionally filter by jurisdiction via path param or query param.
$ curl -s -H "X-API-Key: ms_live_..." \
https://api.maplespike.ca/v1/extraction/tasks | jq .
# Filter by jurisdiction (path param)
$ curl -s -H "X-API-Key: ms_live_..." \
https://api.maplespike.ca/v1/extraction/tasks/nunavut | jq .
// Response
{
"success": true,
"data": {
"tasks": [{
"source_id": "nunavut-bureau-statistics",
"jurisdiction": "nunavut",
"name": "Nunavut Bureau of Statistics",
"url": "https://www.gov.nu.ca/en/...",
"extract_type": "link_list",
"selector": "a[href*='/sites/default/files/']",
"cached": false,
"cache_ttl_hours": 168
}]
}
}
POST /v1/extraction/results
Submit extracted data from the browser client. The server validates the source_id, blocks SSRF attempts (private IPs, localhost), and caches results with a timestamp.
-H "Content-Type: application/json" \
-H "X-API-Key: ms_live_..." \
-d '{
"source_id": "nunavut-bureau-statistics",
"results": [{
"title": "Population Estimates 2024",
"url": "https://www.gov.nu.ca/sites/default/files/pop-2024.xlsx",
"format": "xlsx"
}]
'} | jq .
// Response
{
"success": true,
"data": {
"stored": true,
"source_id": "nunavut-bureau-statistics",
"count": 1,
"rejected": 0,
"cached_at": "2026-07-01T12:00:00.000Z"
}
}
SSRF protection: URLs pointing to localhost, 127.x, 10.x, 192.168.x, or 172.16.x are silently filtered. The rejected field shows how many were blocked.
GET /v1/extraction/cached/:source_id
Retrieve cached extraction results if fresh (within cache_ttl_hours). MCP tools use this as fallback when live sources are unavailable.
https://api.maplespike.ca/v1/extraction/cached/nunavut-bureau-statistics | jq .
// Response (fresh cache)
{
"success": true,
"data": {
"source_id": "nunavut-bureau-statistics",
"results": [...],
"cached_at": "2026-07-01T12:00:00.000Z",
"age_hours": 3.2,
"fresh": true,
"source_name": "Nunavut Bureau of Statistics",
"jurisdiction": "nunavut"
}
}
// Response (expired cache → 404)
{
"success": false,
"error": {
"code": "STALE",
"message": "Cache expired (age: 172h, ttl: 168h)"
}
}
Trim responses for AI agents
Every token saved is money earned. These params go in the same request body — they're extracted before validation.
| Param | Type | Effect |
|---|---|---|
| _fields | string[] | Return only named fields |
| _format | "full" | "compact" | Compact strips null/empty |
| _limit | number | Cap array results |
| _page | number | Pagination offset |
| _summary | boolean | Return aggregates, not rows |
| _mock | true | Sample data, free, no upstream hit |
Every response. Every endpoint. Verifiable.
Every MapleSpike endpoint returns the same citation block — whether you're using the REST API, MCP tools, or cross-reference engine.
"citation": {
"source_name": "open.canada.ca",
"source_url": "https://open.canada.ca/...",
"retrieved_at": "2026-05-13T12:00Z",
"data_hash": "sha256:a1f3...",
"license": "OGL-C",
"citation_text": "open.canada.ca, retrieved 2026-05-13. OGL-C."
}
}
data_hash is the SHA-256 of the response payload at fetch time. Re-fetch the source yourself and compare — if hashes match, you saw what we saw, byte-for-byte.
Data tools for AI agents
All tools return the same { data, quality, citation }.
"mcpServers": {
"maplespike": {
"command": "npx",
"args": ["@maplespike/mcp"],
"env": { "QUILL_API_KEY": "ms_live_..." }
}
}
}
| Category | Tool | Description |
|---|---|---|
| General | query_gov_data | Query Canadian government data releases, datasets, and records. Searches across Statistics Canada (StatCan), open.canada.ca (CKAN), provincial data portals, and federal spending/procurement data. Returns machine-readable data with OGL-C attribution and citation hashes. |
| General | fact_check | Check a specific claim, statement, or statistic against official Canadian government data sources (StatCan, open.canada.ca, federal spending records). Returns corroborating or contradicting evidence with citations, trust scores, and confidence ratings. |
| General | get_citation | Retrieve and verify a citation record by its SHA-256 content hash. Returns the original data, timestamp, source attribution, license, and a ready-to-run shell command for independent verification. Use this to prove that content has not been altered since Quill published it. |
| General | latest_releases | Get the most recent government data releases, economic indicators, and announcements from Statistics Canada, open.canada.ca, and federal/provincial data portals. Use this to stay current on new datasets, revised statistics, and government publications. |
| Parliament | search_committees | Search House of Commons and Senate committee evidence, meeting transcripts, and proceedings. Covers standing committees (e.g., FINA, OGGO, ETHI), special committees, joint committees, and in-camera (secret) meeting records. Returns witness testimony, interventions, and speaker attributions with timestamps. |
| Corporate | search_corporate | Search Canadian corporate registry data, federal procurement contracts, lobbying registrations, and executive statements. Tracks insider transactions, sole-source contracts, company press releases, and corporate-government interactions. Cross-references with federal lobbying registry and proactive disclosure data. |
| Influence | search_influence | Search influence tracking records including international organizations, NGOs, think tanks, and consultancies operating in Canada. Traces government funding flows, CRA charity status, grants data, and organizational connections. Cross-references with federal grant metadata and parliamentary committee oversight. |
| Regulatory | search_gazette | Search the Canada Gazette — the official newspaper of the Government of Canada. Covers Part I (notices, proposed regulations), Part II (enacted regulations), and Part III (Acts of Parliament). Includes Regulatory Impact Analysis Statements (RIAS) with department attribution and effective dates. |
| Regulatory | search_gic | Search Governor-in-Council (GiC) appointments to federal agencies, boards, commissions, and Crown corporations. Includes order-in-council appointment data, salary ranges, departmental categories, appointment types, and cross-references with federal lobbying registry for lobbyists-turned-appointees. |
| Elections | search_elections | Search Elections Canada third-party advertiser registry and financial reports. Tracks advertising spending, platforms used, election periods, and third-party organizations registered with Elections Canada. Cross-references with corporate and influence data to identify connected actors. |
| Corporate | search_provincial_lobbying | Search provincial lobbying registries across Canada. Covers Ontario, British Columbia, Alberta, Quebec, and other provincial lobbying records. Returns lobbying registrations, communication reports, and subject areas. Cross-references with the federal lobbying registry to identify multi-jurisdictional lobbying activity. |
| Oversight | search_oversight | Search independent oversight body reports, investigations, and decisions. Covers the Office of the Auditor General (OAG), Parliamentary Budget Officer (PBO), Office of the Conflict of Interest and Ethics Commissioner (CIEC), Office of the Lobbying Commissioner (OCL), Competition Bureau, and CRTC. Returns report findings, recommendations, investigation outcomes, and merger reviews. |
| Oversight | search_canlii | Search Canadian court decisions via CanLII (Canadian Legal Information Institute). Covers Supreme Court of Canada, Federal Court, Federal Court of Appeal, provincial superior courts, and provincial appeal courts. Returns decision summaries, citations, party information, case history, and government relevance assessments. Tracks legislation citations and cross-references with tracked government departments. |
| Immigration | search_lmia | Search Labour Market Impact Assessment (LMIA) data from Employment and Social Development Canada (ESDC). Provides quarterly statistics on employer use of the Temporary Foreign Worker program, including approval/denial rates, streams (high-wage, low-wage, agriculture, etc.), occupations, provinces, and top employers. Cross-references with corporate data and procurement records for comprehensive TFW program oversight. |
| Immigration | search_immigration | Search Canadian immigration data including IRCC permanent resident admissions, Express Entry summaries, IRB Refugee Protection Division decisions, and CBSA removal/enforcement statistics. Covers monthly PR admissions by province, country of citizenship, and category; quarterly refugee claim grant/refusal rates; and border enforcement actions. |
| Indigenous | search_indigenous_relations | Search Indigenous relations data including CIRNAC specific claims, ISC First Nations financial transparency (chief/council salaries, community budgets), TRC Calls to Action tracker, Jordan's Principle funding, and MMIWG follow-up data. Covers land claims, infrastructure spending, and community well-being indices. |
| Public Safety | search_criminal_justice | Search Canadian criminal justice and corrections data including CSC prison population statistics, Parole Board decisions, RCMP crime statistics (hate crimes, organized crime, youth justice), and PPSC prosecution service data. |
| Transport | search_transport_safety | Search Canadian transport safety and infrastructure data including TSB occurrence datasets (air, rail, marine, pipeline investigations), Transport Canada recalls and violations, Infrastructure Canada project funding, CIIB (Canada Infrastructure Investment Bank) data, and CTA (Canadian Transportation Agency) decisions. |
| Defence | search_defence | Search Canadian defence and veterans data including DND regular force personnel by rank (1997-2025), Defence Capabilities Blueprint procurement data, Veterans Affairs Canada wait times, suicide prevention data, and service statistics. |
| Science | search_science | Search Canadian science, space, and research data — CSA missions, Mitacs grants, Ocean Networks Canada observations, Polar Data Catalogue records |
| Oversight | search_tribunals | Search federal tribunal appointments and decisions (Canada) — GIC appointments to federal tribunals including IRB, CHRT, Competition Tribunal, CITT, Specific Claims Tribunal, and more |
| Global Affairs | search_lode | Query Statistics Canada LODE (Linkable Open Data Environment) geospatial databases. 12 databases covering addresses (~10M buildings), buildings (~14.4M features), healthcare (~7K), recreation (~182K), education (~19K), culture (~8K), businesses (~500K), infrastructure (11 types), greenhouses (~3.9K), pedestrian networks, public transit networks, and cycling networks. Use databaseId to target a specific database, or list=true to see the catalog. |
| Defence | search_veterans | Search Canadian veterans and military personnel data — VAC (Veterans Affairs Canada) benefits, disability claims, education programs, OSISS clinics, veteran suicide statistics, defence transition programs, and wait times data. |
| Influence | search_ngo_rss | Search NGO and think tank publications ingested from RSS feeds — policy papers, reports, press releases, and articles from 30+ tracked organizations. Returns article titles, URLs, publication dates, and narrative classification flags. Results are cross-referenceable against lobbying records and committee mentions. |
| Influence | ngo_narrative_tracker | Analyze NGO and think tank publications for narrative alignment, coordinated messaging, and influence campaigns. Detects when multiple organizations use similar framing, language, or policy recommendations across different publications. Assigns 5GW (fifth-generation warfare) classification flags when applicable. Cross-references against tracked influence actors. |
| Health | search_health | Search Canadian health data — CIHI hospital wait times, health spending, surgical volumes, PHAC disease surveillance, opioid crisis data, CFIA food recalls, drug shortage alerts, and CADTH drug recommendation reviews. Covers federal and provincial health data from the Canadian Institute for Health Information, Public Health Agency of Canada, Canadian Food Inspection Agency, and other health agencies. |
| International | search_ilo | Search ILO (International Labour Organization) labour statistics — employment, unemployment, wages, and labour force indicators across 187 countries. Covers employment-to-population ratios, unemployment rates, wage data, and labour force participation. Data sourced from ILOSTAT API. |
| Procurement | search_proactive_disclosure | Search federal proactive disclosure data — government contracts over $10K, travel and hospitality expenses, and position reclassifications. Covers contracts awarded by all federal departments and agencies. |
| Procurement | search_ati | Search completed Access to Information (ATI) requests published by federal departments. Covers ATI summaries from all government departments and agencies. Useful for finding previously released records, internal reports, and correspondence. |
| Procurement | search_federal_budget | Search federal budget, public accounts, and fiscal monitor data. Covers budget documents, departmental plans, financial statements, and economic projections from the Government of Canada. |
| Economic | search_statcan | Search Statistics Canada datasets including CPI, GDP, labour statistics, population data, trade indicators, and other key economic and social metrics from the Statistics Canada Web Data Service (WDS). |
| Parliament | search_legislation | Search Canadian legislation — Justice Canada consolidated federal laws, provincial legislation, and regulatory data. Covers federal acts, regulations, and provincial statutes from Ontario e-Laws, BC Laws, and Quebec legislation. Set lang=fr to search lois.justice.gc.ca/fra/ for French-language federal legislation. |
| Procurement | search_goc_spending | Search Government of Canada spending data — federal contract awards, grant contributions, and expenditure information from across all departments. Covers GitHub-based federal spending datasets. |
| Municipal | search_municipal | Search municipal open data from Canadian cities (Victoria, Edmonton, Toronto, Vancouver, Montreal, Ottawa, Calgary, etc.) |
| Global Affairs | search_global_canada | Search Global Canada data — Global Affairs Canada trade agreements, ECCC climate and environmental data, CSIS reports metadata, and international relations data. |
| Health | search_health_canada | Search Health Canada data — drug approvals, product recalls, health product safety alerts, natural health product licensing, medical device recalls, and Health Canada regulatory decisions. More specific than the general health search. |
| Environment | search_impact_assessment | Search Impact Assessment Agency of Canada (IAAC) federal project assessments — environmental impact statements, decisions, conditions, and timelines for major resource projects. |
| Environment | search_species_at_risk | Search Species at Risk Act (SARA) registry data — listing decisions, recovery strategies, action plans, and status assessments for Canadian species at risk. |
| Environment | search_fisheries | Search Fisheries and Oceans Canada (DFO) data — fish stocks, licenses, conservation measures, and marine management information. |
| Environment | search_agriculture | Search Agriculture and Agri-Food Canada (AAFC) data — crop reports, farm data, agri-stats, and agricultural production information by province and commodity. |
| Community | search_crown_corporations | Search Canadian Crown corporation data — annual reports, quarterly financials, governance information for CBC, Canada Post, CMHC, EDC, VIA Rail, BDC, and other federal Crown corporations. |
| Charity | search_charity_t3010 | Search CRA T3010 Registered Charity Information Return data. Covers detailed financial statements, director compensation, political activities, program spending, and revenue breakdowns for all registered Canadian charities. More focused on T3010 returns than the general charity search. |
| Economic | search_bank_of_canada | Search Bank of Canada data — interest rate decisions, monetary policy reports, Financial System Reviews, and executive speeches. Covers overnight rate changes, quantitative easing, and monetary policy frameworks. |
| General | datastore_query | Query the cross-module datastore — search previously fetched results across tools. Useful for combining data from multiple Quill tools (e.g., committees + lobbying + procurement). Results are cached with TTL; expired entries are auto-cleaned. |
| General | discover_tools | Search all available Quill MCP tools by intent or topic. Returns ranked tool names and descriptions so you know which tool to call next. Use this FIRST when unsure which tool fits. |
| Environment | search_weather | Search Canadian weather data from Environment Canada — current conditions, forecasts, severe weather alerts, air quality health index (AQHI), radar, marine forecasts, and climate normals. Powered by MSC GeoMet (OGC API). |
| Health | search_nutrient_file | Search the Canadian Nutrient File — food composition data from Health Canada. Find nutrient values (calories, protein, fat, carbs, vitamins, minerals) for Canadian food products. |
| Economic | search_valet_api | Search Bank of Canada Valet API — official exchange rates, interest rates, commodity prices, and economic indicators. More granular than the general Bank of Canada search (this uses the Valet REST API directly). |
| Housing | search_housing_cmhc | Search CMHC (Canada Mortgage and Housing Corporation) housing data — housing starts, rental market surveys, vacancy rates, average rents, housing affordability, mortgage arrears, and NHIP program data. More specific to CMHC than the general housing search. |
| Media | search_crtc_decisions | Search CRTC (Canadian Radio-television and Telecommunications Commission) decisions and rulings. Covers broadcasting decisions, telecom regulatory rulings, licensing renewals, ownership change approvals, and policy determinations. More specific to CRTC decisions than the general CRTC search. |
| Social | search_social_programs | Search Canadian social programs data — CPP/OAS, Employment Insurance, Canada Child Benefit, poverty statistics, social assistance rates, and food security indicators. |
| Social | search_education_research | Search Canadian education and research data — Tri-Council grants (CIHR/NSERC/SSHRC), Canada Research Chairs, Canada Foundation for Innovation, and student loan statistics. |
| Oversight | search_a2aj | Search A2J (Access to Justice) legal data — court decisions, case law coverage, and citation lookup across Canadian courts and tribunals. Covers 116K+ decisions. |
| Provincial | search_ab_data | Search Alberta (AB) government open data — AHS health indicators, AAIP/AINP immigration, Alberta Court of Justice records, education assessments, environment, and more. Queries open.alberta.ca CKAN portal. |
| Transport | search_arcgis_layers | Search ArcGIS feature services and layers across Manitoba, Saskatchewan, and Prince Edward Island. Returns available GIS data services matching your keyword. Use this to find geospatial data for provinces without CKAN portals. |
| Provincial | search_bc_data | Search British Columbia (BC) government open data — PharmaCare, BCPNP immigration, BC Provincial Court records, BC Ministry of Education reports, health, environment, and more. Queries catalogue.data.gov.bc.ca CKAN portal. |
| Parliament | search_bills | Search federal parliamentary bills via Open Parliament. Returns bill numbers, names, sessions, and LEGISinfo IDs. Use this to track legislation progress. |
| Corporate | search_cipo | Search CIPO (Canadian Intellectual Property Office) data — patents, trademarks, industrial designs, and copyright registrations filed in Canada. |
| Housing | search_cmhc | Search CMHC (Canada Mortgage and Housing Corporation) data — housing starts, rental market reports, mortgage trends, and housing supply statistics. Covers national and provincial housing indicators. |
| Parliament | search_committees_op | Search committees via Open Parliament API. |
| Corporate | search_corporate_filings | Search Canadian corporate filings data — SEDAR+ regulatory filings, public company disclosures, annual reports, and financial statements filed with securities regulators. |
| Charity | search_cra_charity | Search CRA (Canada Revenue Agency) registered charity T3010 data. Covers detailed financials, directors, programs, and political activities of every registered Canadian charity. |
| Media | search_crtc | Search CRTC (Canadian Radio-television and Telecommunications Commission) data — broadcasting and telecom regulatory decisions, ownership changes, net neutrality rulings, and licensing decisions. |
| Social | search_culture | Search Canadian culture and heritage data — Canadian Heritage programs, cultural spending, arts grants to organizations, and federal cultural funding initiatives. |
| Parliament | search_debates | Search House of Commons debates via Open Parliament. Returns debate dates, numbers, and most frequent words. Use this to find what Parliament discussed on specific dates or topics. |
| Transport | search_geospatial | Search Canadian geospatial data — federal geospatial databases, CKAN-based geospatial data across federal and provincial portals, topographic maps, and geographic information. |
| Immigration | search_ircc-citizenship | Search IRCC citizenship grants data including breakdowns by province, demographic groups, and year. Tracks permanent resident admissions that have been granted Canadian citizenship. |
| Immigration | search_ircc_entry_exit | Search IRCC quarterly entry/exit data by port of entry, mode of travel, and nationality. Covers traveller volumes at Canadian ports of entry including airports, land borders, and marine ports. |
| Immigration | search_ircc_express_entry | Search IRCC Express Entry rounds — CRS score cutoffs, invitations issued, and program-specific draws. Covers Canadian Experience Class, Federal Skilled Worker, Provincial Nominee, and category-based draws. |
| Immigration | search_ircc_family_sponsorship | Search IRCC family sponsorship statistics by visa office, category, and year. Covers spousal, partner, dependent child, parent and grandparent sponsorship applications and approvals. |
| Immigration | search_ircc_pr_admissions | Search IRCC permanent resident admissions by province, immigration category, and year. Covers economic immigrants, family class, refugees, and other PR admission categories across all provinces and territories. |
| Immigration | search_ircc_processing_times | Search IRCC (Immigration, Refugees and Citizenship Canada) application processing times by visa office and application type. Covers permanent residence, temporary residence, and citizenship application processing timelines. |
| Immigration | search_ircc_study_permits | Search IRCC study permit holder data by institution, province, country, and year. Covers international student enrollment, designated learning institutions, and study permit holders across Canadian provinces and territories. |
| Immigration | search_ircc_work_permits | Search IRCC work permit holder data by NOC code, province, country, and year. Covers temporary foreign workers, international mobility program participants, and post-graduation work permit holders. |
| Science | search_knowledge_fabric | Query the Knowledge Fabric vector knowledge base for deep research across brain sessions, wiki pages, and web sources. Returns synthesized answers with source citations. Use for questions requiring institutional or historical knowledge. |
| Community | search_libraries | Search Canadian public library systems by city, province, or name. Covers 15 cities: Toronto, Ottawa, Montreal, Vancouver, Calgary, Edmonton, Winnipeg, Hamilton, London, Mississauga, Brampton, Surrey, Burnaby, Kitchener, Halifax. Returns branch locations, hours, and contact info. |
| Municipal | search_municipal_data | Search municipal open data across Canadian cities. Covers Toronto, Vancouver, Montreal, Calgary, Ottawa, Edmonton, Winnipeg, Quebec City, Hamilton, Mississauga. When lang=fr, prioritizes French-language portals (donnees.montreal.ca, donnees.ville.quebec.qc.ca). |
| Environment | search_npri | Search National Pollutant Release Inventory (NPRI) data — facility-level pollutant releases, disposals, and transfers by substance, facility, and location across Canada. |
| Environment | search_nrcan | Search Natural Resources Canada (NRCan) data — mining activities, topographic maps, energy statistics, forest inventory, renewable energy, and mineral production. Covers all NRCan sub-modules including energy, mining, forestry, and geospatial data. |
| Provincial | search_nunavut_data | Search government data about Nunavut from federal CKAN, Statistics Canada, and the Nunavut Bureau of Statistics. |
| Provincial | search_on_data | Search Ontario (ON) government open data — OHIP health claims, OINP immigration, EQAO education results, court dockets, environment, and more. Queries data.ontario.ca CKAN portal. |
| Provincial | search_yukon_data | Search Yukon government open data from the CKAN portal at open.yukon.ca (3,785 datasets across 25 organizations including Yukon Geological Survey, Geomatics Yukon, Environment, Health and Social Services, etc.). |
| Community | search_parks | Search Canadian parks and recreation facilities by city or province. Covers 12 cities: Toronto, Vancouver, Calgary, Edmonton, Montreal, Ottawa, Winnipeg, Mississauga, Surrey, Burnaby, Hamilton, Halifax. Returns park names, types, amenities, and sizes. |
| Provincial | search_provincial_data | Search provincial government open data across all 13 provinces and territories. Uses CKAN, Socrata, and other APIs depending on the province. Filter by province code to narrow results. |
| Provincial | search_provincial_legislatures | Search provincial legislature data — Hansard transcripts, committee proceedings, and bills across all 10 Canadian provinces. |
| Provincial | search_provincial_regulators | Search Canadian provincial regulatory bodies data — securities commissions, law societies, police oversight, engineering regulators, medical colleges, and other professional regulators across all provinces. |
| Provincial | search_qc_data | Search Quebec (QC) government open data — RAMQ health insurance, immigration (MIFI), Cour du Québec records, education ministry data, environment, and more. Queries donneesquebec.ca CKAN portal. |
| Transport | search_real_time_feeds | Search Canadian real-time government data feeds — emergency alerts (CAP-CP), health advisories, urgent notices, and other time-sensitive government communications. |
| Transport | search_regional_authorities | Search Canadian regional authority data — regional districts, municipalities, and local governance information across Canada including regional services, planning, and transit authorities. |
| Corporate | search_sedi | Search SEDI (System for Electronic Disclosure by Insiders) insider trading data. Covers TSX-listed company executive and director stock transactions, including purchases, sales, and option exercises. |
| International | search_un | Search UN Data Sources via the UNdata SDMX REST API — population, trade, national accounts, development indicators, environment, energy, education, health statistics. Supports querying by database category or specific dataflow ID. |
| Community | search_unions | Search Canadian labour union data — collective agreements, membership statistics, and labour organization information across federal and provincial jurisdictions. |
| Community | search_universities | Search Canadian university data — tuition fees, enrollment statistics, program costs, and institutional finances across all Canadian universities. |
| Environment | search_energy_data | Search energy production and consumption data. Results from open.canada.ca. |
| Environment | search_climate_data | Search climate change and weather data. Results from open.canada.ca. |
| Public Safety | search_public_safety | Search public safety and emergency management data. Results from open.canada.ca. |
| Procurement | search_federal_contracts | Search federal government contract awards. Results from open.canada.ca. |
| Procurement | search_federal_grants | Search federal grants and contributions data. Results from open.canada.ca. |
| Social | search_gender_stats | Search gender-based statistics and equality data. Results from open.canada.ca. |
| Housing | search_housing_data | Search housing and rental market data. Results from open.canada.ca. |
| Science | search_mining_data | Search mining and mineral production data. Results from open.canada.ca. |
| Social | search_official_languages | Search official languages data and statistics. Results from open.canada.ca. |
| Science | search_technology_data | Search technology, innovation and telecom data. Results from open.canada.ca. |
| Corporate | search_patents | Search Canadian patent data from CIPO. Results from open.canada.ca. |
| Corporate | search_trademarks | Search Canadian trademark data from CIPO. Results from open.canada.ca. |
| Health | search_pharmaceuticals | Search Pharmaceuticals & Drug Policy data — PMPRB drug pricing, Health Canada Drug Product Database, drug shortages, and CADTH reviews. Covers Canadian pharmaceutical regulation and pricing. |
| Media | search_telecommunications | Search Telecommunications & Digital data — CRTC market reports, ISED spectrum management, CIRA internet data, and broadband coverage across Canada. |
| Housing | search_real_estate | Search Real Estate & Housing data — CMHC rental markets, housing starts, house prices, and affordability metrics from open.canada.ca. |
| Public Safety | search_emergency_management | Search Emergency Management & Public Safety data — Canadian Disaster Database, ECCC alerts, NRCan geohazards, and provincial emergencies. |
| Indigenous | search_indigenous_services_directory | Search Indigenous Services Canada directory — searchable directory of Indigenous service providers, programs, and community services. |
| Public Safety | search_policing_security | Search Policing, Intelligence & National Security data — RCMP crime stats, CSIS reports, CSE cybersecurity advisories, and CSC corrections. |
| Corporate | search_financial_regulation | Search Financial Regulation data — OSFI, CDIC, FCAC, and securities regulator data from open.canada.ca. |
| Media | search_media_broadcasting | Search Media & Broadcasting data — CRTC ownership, government ad spending, and BBM audience data. |
| Municipal | search_municipal_long_tail | Search Municipal Long-Tail data — smaller municipalities, regional districts, and specialized local government datasets. |
| Provincial | search_provincial_orgs | Search Provincial Organizations data — provincial agencies, boards, and commissions directory across Canada. |
| Entity | search_cross_reference | Cross-reference engine — resolves an entity name across committees, corporate, lobbying, GIC, elections, CanLII, and influence modules. Returns per-registry hits with link confidence (graph-backed, not keyword search). Use this to find everything every registry says about a person or organization. |
| Environment | search_nrcan_renewable | Search NRCan Renewable Energy data — renewable capacity, generation, and installations by province and technology type. |
| Environment | search_nrcan_fires | Search NRCan Forest Fire data — fire hotspots, burned areas, and fire cause data across Canada. |
| Environment | search_nrcan_forests | Search NRCan Forest Inventory data — national forest inventory with biomass, carbon, and species data by ecozone. |
| Environment | search_nrcan_minerals | Search NRCan Mineral Production data — mineral production volumes and values by commodity and province. |
| International | search_oecd_stat | Search OECD Statistics data — economic, social, and environmental indicators from OECD.Stat API. |
| International | search_undp_hdi | Search UNDP Human Development Index data — HDI rankings and component indicators across countries. |
| International | search_unhcr_refugees | Search UNHCR Refugee Statistics data — refugee, asylum-seeker, and forcibly displaced population data worldwide. |
| International | search_us_cia | Search CIA World Factbook data — country profiles with demographics, economy, defence, and infrastructure indicators for Five Eyes comparison. |
| International | search_au_abs | Search Australian Bureau of Statistics data — CPI, GDP, labour force, population, and trade via SDMX-JSON API. |
| International | search_nz_stats | Search Statistics New Zealand data — CPI, GDP, labour, population, and trade via OData API. |
| International | search_uk_ons | Search UK Office for National Statistics data — CPI, GDP, labour force, population, trade, and housing via time series API. |
| International | search_who_gho | Search WHO Global Health Observatory data — life expectancy, mortality, health expenditure, and disease prevalence indicators. |
| International | search_eurostat | Search Eurostat data — EU statistical data: economy, population, trade, agriculture, energy, and social indicators. |
| Transport | search_utilities | Search Canadian utility providers by province or type. Covers 15 major hydro, gas, and water utilities across all provinces. |
| System | cache_clear | Clear the query optimization cache. Use when you need fresh data or after data updates. Returns the number of entries cleared. |
| System | cache_status | Query optimization cache status. Returns cache hit/miss rates, current cache size, and TTL range. Use system_health for full optimization stats. |
| Economic | compare_regions | Compare economic and demographic indicators across Canadian provinces and territories. Uses Statistics Canada data for population, employment, and economic metrics combined with federal spending data from CKAN. |
| Entity | get_annotations | Retrieve annotations for a specific entity from the journalism annotation system. Returns all notes, flags, overrides, and context annotations for the given entity type and ID. Optionally filter by user ID to get annotations from a specific user. When an API server is configured (QUILL_API_URL), queries it for persistent storage; otherwise uses an in-memory store (annotations created through the API server will not be visible). |
| Entity | get_entity_profile | Cross-reference a person across MP, lobbying, and GIC data. |
| Parliament | get_member_info | Get information about current and former Members of Parliament via Open Parliament. Returns name, party, riding, and photo URL. Use this to look up MP details by name. |
| System | get_module_health | Get detailed health metrics for a specific ingestion module. Returns status (healthy/degraded/unhealthy), upstream reachability, success rate, consecutive failures, and last error message. Use this to diagnose why a specific data source is failing. |
| System | get_pipeline_health | Get a high-level health summary of the entire MapleSpike ingestion pipeline. Returns system status (healthy/degraded/unhealthy), total module counts, and a list of all modules with their current health status. Use this to identify systemic failures or multiple failing data sources. |
| Parliament | get_politician_influence | Comprehensive influence profile for a Canadian politician. Combines MP info, lobbying meetings, voting records, and GIC appointments from openparliament.ca and CKAN. Use this to understand a politician's full footprint across government data. |
| System | qa_schema | Extract and view TypeScript schema definitions for ingestion modules. Returns field names, types, required status, and descriptions. Use this to understand the data shape expected by a module. |
| System | qa_validate_module | Run data integrity validation on an ingestion module. Checks required fields, types, ranges, string lengths, and enum values against the module schema. Returns pass/fail results per field. Use this to verify data quality before or after ingestion. |
| Economic | query_bridges | Query bridge infrastructure conditions across Canadian provinces. Uses Statistics Canada Core Public Infrastructure data. Returns condition ratings (very good, good, fair, poor, very poor) with percentages. Compare infrastructure quality between provinces. |
| Economic | query_cpi | Consumer Price Index (inflation) from Statistics Canada. Uses Statistics Canada data. Returns time-series data with values and reference dates. |
| Economic | query_gdp | Gross Domestic Product from Statistics Canada. Uses Statistics Canada data. Returns time-series data with values and reference dates. |
| Economic | query_labour | Labour force characteristics including employment and unemployment from Statistics Canada. Uses Statistics Canada data. Returns time-series data with values and reference dates. |
| Economic | query_population | Population estimates for Canada, provinces and territories from Statistics Canada. Uses Statistics Canada data. Returns time-series data with values and reference dates. |
| Economic | query_trade | International merchandise trade data from Statistics Canada. Uses Statistics Canada data. Returns time-series data with values and reference dates. |
| Parliament | search_votes | Search House of Commons voting records via Open Parliament. |
| Environment | search_agriculture_data | Search agriculture and agri-food data. Results from open.canada.ca. |
| Immigration | search_citizenship_data | Search Canadian citizenship statistics. Results from open.canada.ca. |
| Corporate | search_corporate_registry | Search federal corporations registry data. Results from open.canada.ca. |
| Social | search_culture_data | Search culture, arts and heritage data. Results from open.canada.ca. |
| Social | search_education_stats | Search education statistics and enrolment data. Results from open.canada.ca. |
| Regulatory | search_gazette_part1 | Search Canada Gazette Part I. Returns items matching your query. |
| Regulatory | search_gazette_part2 | Search Canada Gazette Part II. Returns items matching your query. |
| Regulatory | search_gazette_part3 | Search Canada Gazette Part III. Returns items matching your query. |
| Immigration | search_immigration_refugees | Search immigration and refugee data. Results from open.canada.ca. |
| Indigenous | search_indigenous_stats | Search Indigenous peoples statistics and data. Results from open.canada.ca. |
| Transport | search_transportation_data | Search transportation and infrastructure data. Results from open.canada.ca. |
| System | searxng_health | Check SearXNG engine health: which engines are failing, suspended, or rate-limited. Returns engine success rates, suspension times, and error counts. |
| General | smart_search | Intelligent search across all Canadian government data. Understands intent, expands synonyms, detects time-series queries, and summarizes recent changes. Sources: Parliament (debates, bills, votes, MPs, committees), Gazette (regulations), Government open data (health, economy, environment, immigration, spending, etc.) |
| Parliament | track_bill | Track a Canadian federal bill through Parliament. Combines bill status, related debates, voting records, and regulatory impact from multiple sources. Use this to follow legislation end-to-end. |
| International | get_wdi_indicator | Fetch World Bank Development Indicator data for specific countries |
| International | compare_wdi_countries | Compare a World Bank indicator across multiple countries |
| International | get_country_wdi_profile | Get comprehensive country profile with key development indicators |
| International | analyze_indicator_trend | Analyze trend for a World Bank indicator over time |
| International | fetch_topic_indicators | Fetch all indicators for a specific topic (economy, health, social, etc.) |
| International | get_indicator_metadata | Get metadata for a World Bank indicator |
| International | get_comtrade_by_partner | Fetch UN Comtrade trade data for a specific partner country |
| International | get_comtrade_by_commodity | Fetch UN Comtrade trade data for a specific commodity |
| International | get_comtrade_trends | Get UN Comtrade trade trends over time |
| AI | ai_ask | Ask a natural language question about Canadian government data. Uses AI to search across all pipeline sources (committees, lobbying, procurement, regulations, courts, oversight) and return a cited, synthesized answer. |
| AI | ai_analyze | Analyze a document, transcript, or data set using AI. Detects topics, sentiment, entities, and generates a structured summary with metadata. Supports different analysis modes. |
| AI | ai_search_semantic | Semantic search across all ingested pipeline data using vector embeddings. Finds conceptually related documents even when keywords do not match. Uses the AI Inference Gateway for embedding and Qdrant vector DB for similarity search. |
| General | explore_catalog | Browse the MapleSpike data catalog. Lists all available data sources, MCP tools, and categories. Use this to discover what data is available before searching. Filter by category or search terms to find relevant tools. |
| System | signal_check | Check for new or changed items across watched government data sources (committees, Gazette, lobbying, procurement, oversight). Returns recently added items since the last check. Use this proactively to detect new regulatory filings, committee activity, or lobbying registrations. |
| System | system_health | Check the MapleSpike API service health. Returns service status, version, environment, tenant tier, current API call usage (daily/monthly), local free-tier quota (1,000 calls/month per identity, then x402 charged per call), per-dependency health checks (API server, storage, cache) with response times, and query optimization statistics (cache hit rate, result limits). Use this to verify the API is responding and to check your quota. |
| Entity | resolve_entity | Resolve a person or organization name to all known mentions across every MapleSpike data source. Returns a consolidated profile with canonical name, aliases, all source appearances (committees, lobbying, procurement, corporate, etc.), roles, and dates. Use this when you need to find everything the system knows about a specific person or organization. |
| Entity | find_connections | Discover the relationship network around a person or organization. Returns connected entities (people, organizations), relationship types (employs, lobbies, directs, owns), and confidence scores. Use this for conflict-of-interest detection, influence mapping, and network analysis. Example: find who a committee witness is connected to via lobbying or corporate roles. |
| General | linked_entities | Cross-reference an entity across every registry Quill tracks (lobbying, GIC, committees, corporate, CanLII, elections, oversight, municipal, provincial). Resolves the name to its canonical entity, then assembles per-registry evidence with confidence. Use this to answer "what does each registry say about X" in a single call. |
| General | verify_claim | Verify a Quill claim bundle. Provide a sha256 hash to check it exists in the claim store, and optionally the original data to recompute the hash locally and confirm integrity. Returns { verified, matches, recomputedSha256 }. Use this to audit any hash you received from Quill. |
| General | resolve_quill_id | Resolve a question about Canadian public data into canonical Quill IDs you can pass to query_quill. Returns ranked IDs (e.g. /committees, /ircc/study-permits, quill://entity) with descriptions, provenance scores, update cadence, and the underlying tool each ID routes to. You MUST call this before query_quill unless the user provided an ID directly. Do not call more than 3 times per question. |
| General | query_quill | Execute a Canadian public data query by Quill ID. You MUST call resolve_quill_id first to obtain a valid ID (format: /category, /category/dataset, or quill://entity) UNLESS the user provided one directly. Every result carries the routed tool name and — for cited records — a SHA-256 claim hash with a ready verify_claim recipe so answers are independently checkable. Do not call this tool more than 3 times per question. |
| General | x402-deposit | Deposit USDC on Solana to pre-fund your credit balance. Provide a verified transaction signature and the amount in USDC. Subsequent tool calls draw from this balance without per-call on-chain latency. |
Showing 184 MCP tools. Use the search box or category dropdown to filter. The full tool list is also available in llms.txt for machine consumption.
Per-plan caps
Rate limits are per-second and per-month. Hitting the per-second limit returns 429 with a Retry-After header.
| Plan | Per sec | Per month | Overage |
|---|---|---|---|
| Free | 2/s | 1,000 | Hard cap (402) |
| Pro | 25/s | 50,000 | $1/1K (planned) |
| Business | 100/s | 250,000 | $0.80/1K (planned) |
| Enterprise | Custom | Custom | Negotiated |
One shape. Specific categories.
All error responses carry success: false, a stable error code, an English message and a French message_fr in French. Every error includes both languages so your app can render the right locale without a separate request.
Bilingual Error Response
Every API error returns both an English and a French message. Example 429 response:
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Please slow down.",
"message_fr": "Limite de débit dépassée. Veuillez ralentir."
}
}
When building a French-language UI, display message_fr to your users. The message field is always English and suitable for logging.
Error reference
| Code | Status | Retry | Meaning |
|---|---|---|---|
| auth_invalid | 401 | No | Fix API key or JWT |
| rate_limited | 429 | Yes | Respect Retry-After header |
| quota_exhausted | 402 | No | Upgrade plan or wait for reset |
| input_invalid | 400 | No | Check input schema |
| source_unavailable | 502 | Yes | Upstream source down, retry later |
| not_found | 404 | No | Resource doesn't exist |
| server_error | 500 | Yes | Backoff, report if persistent |
Common questions
Do I need a credit card to start?
No. Free plan: 1,000 calls/month, every source, every SDK, citation hashes included. No card, no time limit.
What makes the citations verifiable?
Every response includes source name, exact upstream URL, retrieval timestamp, and a SHA-256 content hash. You can re-fetch and confirm exactly what the agent saw.
Which AI frameworks are supported?
MCP (Claude, Cursor, Windsurf, ChatGPT), Anthropic tool_use, OpenAI function calling. TypeScript and Python SDKs.
How fresh is the data?
Depends on the source. Committee evidence: ~24h. Canada Gazette: within hours of publication. CanLII: daily. Every response ships with a freshness_seconds field.
What is the cross-reference engine?
Search for any person or company and get their complete government footprint — lobbying meetings, committee testimony, GIC board appointments, procurement contracts, court cases, and campaign donations — in a unified timeline.
Is my API key secure?
Keys are hashed with SHA-256 at rest — we only see them at verify time. HTTPS-only transit. Rotate from the workspace instantly.