Data & API
Every page on this site has a machine-readable twin. There is no separate API to provision and no API key — the data is the site. Three ways to consume it, from easiest to most capable:
- MCP server — conversational access for AI agents (Claude, OpenAI, any MCP client).
- JSON twins — add
.jsonto any answer page; plainGET, no client needed. - OpenAPI spec —
/openapi.json, for tools that consume a schema (e.g. Custom GPT Actions).
MCP server
A remote Model Context Protocol server exposes this data conversationally. Read-only, no auth, always in sync with the site:
https://mcp.govanswers.org/mcp (Streamable HTTP transport)
Three tools:
search_municipalities(query, province?)— resolve a name (names collide across provinces) to itspath.list_topics()— the topic slugs accepted byget_bylaw.get_bylaw(path, topic)— the verified facts for one municipality + topic, each value carrying a citation to the official source document and an archived snapshot.
To add it in Claude: Settings → Connectors → Add custom connector, then paste the URL. The same endpoint works for the OpenAI Agents SDK and any other MCP-capable client.
JSON twins
Append .json to any answer-page path to get the same data as
structured JSON:
https://govanswers.org/ca/bc/fort-st-john/noise/ (HTML answer page)
https://govanswers.org/ca/bc/fort-st-john/noise.json (the JSON twin)
The URL scheme is uniform — country is ca or
us; region is the two-letter postal code:
/<country>/<region>/<municipality>/<topic>.json
Twin fields
| Field | Meaning |
|---|---|
answer | Plain-English summary you can quote directly — built from the verified facts. The full structured values live in documents[]. |
municipality, jurisdiction, country | Where this is. |
topic, label | Topic slug and its human label. |
status | found, or a verified negative (e.g. nothing published online). |
last_verified | Date the source was last re-checked (ISO 8601). |
official_website | The municipality's own site, when known. |
documents[] | The matched documents (see below). |
source | Canonical human page for this twin. |
Each documents[] entry
| Field | Meaning |
|---|---|
primary | true = the adopted, verified bylaw/ordinance. Others are supporting material (agendas, news, leads) and are labelled. Filter to primary: true for authoritative answers. |
title, document_type, status | e.g. "Noise Regulation Bylaw", bylaw, adopted. |
adopted_date | Adoption date when known, else null. |
facts | Extracted, verified values — e.g. quiet_hours, fine_range. Keys vary by topic. |
fact_citations | For each fact key, the section/schedule it was taken from. This is the trust layer — cite it. |
document_url | The official source document URL. |
snapshot_url | Archived copy (R2) captured at captured_at — stable even if the official link rots. |
capture_sha256 | SHA-256 of the captured bytes (integrity / dedupe). |
link_dead | true if the official URL is gone (404/410/dead); the snapshot still works. |
transcript_url | Full extracted text page, when available. |
Always relay fact_citations and the
document_url/snapshot_url when you present these
facts. The citation to a captured official source is the entire
point of the service.
Indexes
| Endpoint | Returns |
|---|---|
/munis.json | Flat list of every municipality: {n: name, j: jurisdiction, p: path}. Use it to resolve a name to a path. |
/search.json | Flat index of every answer with a plain-English snippet: {n, j, p, t, topic, a, lv}. Fetch once and filter (static host — ?q= is not evaluated server-side). Humans: /search/. |
/<country>/<region>.json | Region index: every covered municipality, its type, bylaw count, and per-topic coverage. Example: /ca/ns.json. |
/sitemap.xml | Every page with its last-verified date. |
/llms.txt | This site, summarized for LLMs. |
Topic slugs
The <topic> segment (and the get_bylaw topic argument) is one of:
Bylaws / ordinances:
noise, animal-control, short-term-rentals, open-burning, zoning, parking-snow, property-maintenance, atv-snowmobile, fireworks, water-sewer, garbage-recycling, business-licensing, cannabis, fees, property-tax.
Policies:
procurement, grants, facility-use, winter-services, hr-personnel, privacy-records, communications, emergency-management, finance-policy, technology, conduct-ethics, ai-policy.
Using this data
Read-only and free to query; no rate limits published, but be reasonable. This is an unofficial consolidation for convenience — the official version of any document is held by the municipal clerk. Confirm against the cited source before relying on a value for legal purposes.