MapleSpike Criminal Justice API

Criminal justice — corrections population, parole decisions, RCMP crime stats, PPSC prosecutions

GitHub OpenAPI

Operations 4

GET /v1/criminal-justice/corrections-population CSC incarceration rates, demographics, costs per inmate #
GET /v1/criminal-justice/parole-decisions Parole Board of Canada decisions and registry #
GET /v1/criminal-justice/rcmp-crime-stats RCMP incident-based crime statistics by violation #
GET /v1/criminal-justice/prosecutions PPSC caseloads, outcomes, stay rates #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/maplespike-ca:maplespike-ca-criminal-justice-api"
All apis
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.

Get an API 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 Specification

maplespike-ca-criminal-justice-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: MapleSpike Criminal Justice 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: criminal-justice
  description: Criminal justice — corrections population, parole decisions, RCMP crime stats, PPSC prosecutions
paths:
  /v1/criminal-justice/corrections-population:
    get:
      tags:
      - criminal-justice
      summary: CSC incarceration rates, demographics, costs per inmate
      operationId: criminal-justice-corrections-population
      parameters:
      - name: year
        in: query
        required: false
        schema:
          type: string
      - name: province
        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/criminal-justice/parole-decisions:
    get:
      tags:
      - criminal-justice
      summary: Parole Board of Canada decisions and registry
      operationId: criminal-justice-parole-decisions
      parameters:
      - name: year
        in: query
        required: false
        schema:
          type: string
      - name: outcome
        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/criminal-justice/rcmp-crime-stats:
    get:
      tags:
      - criminal-justice
      summary: RCMP incident-based crime statistics by violation
      operationId: criminal-justice-rcmp-crime-stats
      parameters:
      - name: year
        in: query
        required: false
        schema:
          type: string
      - name: province
        in: query
        required: false
        schema:
          type: string
      - name: violation
        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/criminal-justice/prosecutions:
    get:
      tags:
      - criminal-justice
      summary: PPSC caseloads, outcomes, stay rates
      operationId: criminal-justice-prosecutions
      parameters:
      - name: year
        in: query
        required: false
        schema:
          type: string
      - name: province
        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