MapleSpike Data API
Government data — spending, elections, demographics, salaries
Government data — spending, elections, demographics, salaries
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/maplespike-ca:maplespike-ca-data-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: MapleSpike Data API
version: 0.2.0
description: Canadian public-sector data API. Coverage and response fields vary by endpoint and source. Where supplied, Quill record hashes support integrity comparisons but do not establish source authenticity or reuse rights. Publisher terms vary by dataset; consult the original source. Software license declarations vary by repository artifact; see https://github.com/reverb256/quill/blob/main/docs/open-source-audit.md.
contact:
name: MapleSpike
url: https://maplespike.ca
email: hello@maplespike.ca
servers:
- url: https://api.maplespike.ca/v1
description: Production
- url: http://localhost:8081/v1
description: Local development
tags:
- name: Data
description: Government data — spending, elections, demographics, salaries
paths:
/v1/data/government-spending:
get:
tags:
- Data
summary: Federal and provincial government expenditure data
operationId: data-government-spending
parameters:
- name: department
in: query
required: false
schema:
type: string
- name: year
in: query
required: false
schema:
type: string
- name: category
in: query
required: false
schema:
type: string
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
- name: min_amount
in: query
required: false
schema:
type: string
responses:
'200':
description: Successful response; payload, citations, and provenance vary by endpoint and source.
content:
application/json:
schema:
$ref: '#/components/schemas/QuillResponse'
'401':
description: API key missing or invalid
'402':
description: Quota exhausted
security:
- ApiKeyAuth: []
/v1/data/election-results:
get:
tags:
- Data
summary: Historical and current election results
operationId: data-election-results
parameters:
- name: year
in: query
required: false
schema:
type: string
- name: riding
in: query
required: false
schema:
type: string
- name: party
in: query
required: false
schema:
type: string
- name: type
in: query
required: false
schema:
type: string
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
responses:
'200':
description: Successful response; payload, citations, and provenance vary by endpoint and source.
content:
application/json:
schema:
$ref: '#/components/schemas/QuillResponse'
'401':
description: API key missing or invalid
'402':
description: Quota exhausted
security:
- ApiKeyAuth: []
/v1/data/population-statistics:
get:
tags:
- Data
summary: Population and demographic statistics
operationId: data-population-statistics
parameters:
- name: region
in: query
required: false
schema:
type: string
- name: year
in: query
required: false
schema:
type: string
- name: demographic
in: query
required: false
schema:
type: string
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
responses:
'200':
description: Successful response; payload, citations, and provenance vary by endpoint and source.
content:
application/json:
schema:
$ref: '#/components/schemas/QuillResponse'
'401':
description: API key missing or invalid
'402':
description: Quota exhausted
security:
- ApiKeyAuth: []
/v1/data/public-salary-disclosure:
get:
tags:
- Data
summary: Public sector salary disclosures (sunshine lists)
operationId: data-public-salary-disclosure
parameters:
- name: employer
in: query
required: false
schema:
type: string
- name: year
in: query
required: false
schema:
type: string
- name: min_salary
in: query
required: false
schema:
type: string
- name: name
in: query
required: false
schema:
type: string
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
responses:
'200':
description: Successful response; payload, citations, and provenance vary by endpoint and source.
content:
application/json:
schema:
$ref: '#/components/schemas/QuillResponse'
'401':
description: API key missing or invalid
'402':
description: Quota exhausted
security:
- ApiKeyAuth: []
components:
schemas:
ResponseMeta:
type: object
properties:
requestId:
type: string
timestamp:
type: string
format: date-time
description: API response timestamp, not source retrieval time.
version:
type: string
usage:
type: object
properties:
periodCalls:
type: integer
periodLimit:
type: integer
tier:
type: string
agent:
type: string
action:
type: string
authMethod:
type: string
creditsCharged:
type: number
cacheStatus:
type: string
enum:
- hit
- miss
- mock
durationMs:
type: number
QualityMeta:
type: object
properties:
freshness_seconds:
type: number
source_uptime_7d:
type: number
confidence:
type: string
enum:
- high
- medium
- low
certainty_score:
type: number
last_verified:
type:
- string
- 'null'
format: date-time
data_completeness:
type: string
CitationMeta:
type: object
properties:
source_name:
type: string
source_url:
type: string
retrieved_at:
type:
- string
- 'null'
format: date-time
description: Source acquisition time only when observed.
data_hash:
type: string
description: For claim records, SHA-256 of canonical Quill record JSON, not upstream response bytes.
license:
type: string
description: Publisher metadata or a notice to consult source terms; not a reuse grant.
license_url:
type: string
license_basis:
type: string
enum:
- publisher-metadata
- source-configuration
- no-publisher-declaration
attribution_text:
type: string
update_frequency:
type: string
original_format:
type: string
citation_text:
type: string
citation_footnote:
type: string
provenance_evidence:
anyOf:
- $ref: '#/components/schemas/ProvenanceEvidence'
- type: 'null'
QuillResponse:
type: object
description: Common API envelope. Payload and citation fields vary by route and source.
properties:
success:
type: boolean
data:
description: Route-specific payload; shape varies by endpoint.
text:
type:
- string
- 'null'
error:
anyOf:
- $ref: '#/components/schemas/ApiError'
- type: 'null'
meta:
$ref: '#/components/schemas/ResponseMeta'
quality:
anyOf:
- $ref: '#/components/schemas/QualityMeta'
- type: 'null'
citation:
anyOf:
- $ref: '#/components/schemas/CitationMeta'
- type: 'null'
ApiError:
type: object
properties:
code:
type: string
message:
type: string
message_fr:
type: string
details:
type: array
items: {}
ProvenanceEvidence:
type: object
description: Evidence inventory only; it does not establish source identity, completeness, or reuse rights.
required:
- schema_version
- record_integrity
- acquisition
- transformations
- publisher_terms
properties:
schema_version:
const: quill.provenance.v1
record_integrity:
type: object
properties:
algorithm:
const: SHA-256
digest:
type: string
pattern: ^[a-f0-9]{64}$
scope:
const: canonical-json-record
canonicalization:
const: quill-canonical-json-v1
acquisition:
type: object
properties:
status:
type: string
enum:
- captured
- not-captured
association:
type: string
enum:
- url-matched-not-content-verified
- not-established
- none
artifacts:
type: array
items:
type: object
properties:
association:
type: string
enum:
- url-matched-not-content-verified
- not-established
evidence_source:
type: string
enum:
- explicit-record-evidence
- shared-http-client-capture
url:
type: string
retrieved_at:
type: string
format: date-time
sha256:
type: string
pattern: ^[a-f0-9]{64}$
hash_scope:
const: http-client-response-body-utf8
status_code:
type: integer
media_type:
type:
- string
- 'null'
byte_length:
type:
- integer
- 'null'
etag:
type:
- string
- 'null'
last_modified:
type:
- string
- 'null'
url_redacted:
type: boolean
body_capture:
type: string
enum:
- complete-http-client-body
- empty-body-not-captured
transformations:
type: object
properties:
status:
type: string
enum:
- pipeline-reported
- not-recorded
coverage:
const: declared-steps-only
steps:
type: array
items:
type: string
stages:
type: object
properties:
module_code_revision:
type:
- string
- 'null'
parser_version:
type:
- string
- 'null'
transform_code_revision:
type:
- string
- 'null'
publisher_terms:
type: object
properties:
status:
type: string
enum:
- publisher-metadata-observed
- source-configuration-only
- not-observed
label:
type:
- string
- 'null'
url:
type:
- string
- 'null'
observed_fields:
type: array
items:
type: string
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: API key from https://maplespike.ca/workspace