# Changelog

The API follows semantic versioning within `/api/v1`: new endpoints and fields can appear at any time; nothing is removed or renamed without a new version (`/api/v2`, announced here at least 90 days ahead). Current version: **1.5.0**.

## 1.5.0 (2026-11-10)

- Invalid values of documented parameters are now a `400` naming the parameter and the accepted values (whole numbers, numbers, booleans, enums, real dates, `limit`/`offset`, and `from` after `to`); parameters an endpoint does not document are still ignored. `/events` refuses an unknown `category` or `source`.
- Every response has `meta.updatedAt`: when the handler gives none, the newest update time in the records (`meta.updatedAtBasis: "records"`) or when the build was made (`"build"`). Every array response has `meta.total` and `meta.count`.
- `/power/outages` pages `nearby` (`limit`, `offset`, `links.next`) and adds `nearbyTotals` and `byMunicipality`, which count every nearby outage; `polygons=false` drops the outlines. `/home` lists the ten nearest outages without outlines. `/rivers` takes `hours` (default 72). `/transit/shapes` takes `route`.
- `/sports/games` defaults to `order=upcoming`: live and coming games first, then past games newest first.
- `/businesses?q=` orders by relevance (`sort=relevance`, the default with `q`) and also includes listings matching the query’s most distinctive word, after the full matches.
- Business records everywhere carry `slug` (stable id), `publicSlug` (page address segment) and `url`.
- Documented examples use a current record, and the documented cache times print the exact `Cache-Control` header.
- MCP 1.7.0: results are one JSON text block (no duplicate `structuredContent`, no per-tool output schema: `tools/list` is about 36 KB instead of 90 KB); every data result has `paging` and one `continuation` (the same focused tool with the next offset); list tools return compact records with a `detail` call; new tools `find_guides`, `find_facilities`, `get_air_quality`, `get_wildfire`; MCP has its own rate-limit bucket and refuses with JSON-RPC errors; the server card is also at `/.well-known/mcp.json`.

## 1.4.0 (2026-11-10)

- `/news`: `q` matches the same way, and `source` names match in any case and with either apostrophe. `q` on list endpoints (businesses, categories, food places, services, fuel and EV stations, guides, stories, event series, stays, festivals, trips and others) matches like site search: each word at the start of a word, by stem, other spelling or synonym ("dentist" finds "Dental"); a word inside another word no longer matches ("rn" is not in "Northern"), and "nurse" no longer finds "nursery".
- `/events` and `/events/{id}`: `free` (true only when the listing says the event is free) and `ticketUrl` (the event’s link when it is a ticketing page); `/events?free=true` lists them.
- `/council/votes` without `term`: while a new council has no recorded vote yet, the latest term with votes, named in `meta.term` with `meta.termNote`.
- `/guides` and `/stories`: `image` is the media library copy the pages show (nullable).
- MCP 1.6.0: data tools declare their result shape (`outputSchema`); a tool call counts once toward the rate limit (its first data read is included); `find_events` takes `free`.

## 1.3.0 (2026-11-10)

- Absolute links: site-relative links in the data (images, publisher logos and business thumbnails under `/media/`, page links, `/api/v1/…` follow-up links such as `geojson` and `departures`) now come as full URLs, so they work wherever a response is used. `path` fields keep their documented path form.
- `fields=` selections now get the same UTC offsets on local date-times as full responses.
- `/search`: event results add `image` and `api` (the event’s API URL), news results add `image`.
- `/services/places/{id}`: the landfill and transfer stations link their own pages (`page`).
- `/jobs`: each `q` word matches at the start of a word ("rn" no longer matches "Northern"), and with `q` the default order is the new `sort=relevance` (postings with the words in the title first, then newest); `sort=newest` keeps the old order.
- MCP 1.5.0: new tools `get_alerts`, `get_power_outages`, `get_road_closures`, `get_school_closures`, `find_restaurants`, `find_public_services`, `get_holidays`, `find_sports_games` and `find_council_votes`; every list tool takes `offset`; `find_news` adds `source`, `kind` and `sort`, `find_events` adds `venue`, `source` and `past`, `find_jobs` adds `employer`, `term`, `hours`, `workplace`, `within`, `minWage` and `sort`, `find_businesses` adds `neighbourhood` and `near`; focused tools return twice as much before paging; `discover_api` also matches the words people use for each feature.

## 1.2.0 (2026-10-22)

- New endpoints: `/time` (the city’s time zone, UTC offset, last and next clock change, the official rule statement, a year of daylight on the current and former clocks, and the time in nearby places) and `/time/sun` (sunrise, sunset and first and last light for the page’s key days, or `days` days from `from`), all computed from the IANA time zone database and NOAA’s solar equations.
- New endpoints: `/pets` (animals listed for adoption near the city by shelters whose listings allow it: name, species, breed, age, sex, shelter, distance and the link to apply; `species`, `new`) and `/pets/resources` (shelters and rescues with their own adoption pages, official lost-and-found steps, dog licence fees).

## 1.1.1 (2026-10-20)

- `/changes` publishes the next page of an unfinished window as `links.next` (and `Link: rel="next"`), carrying `cursor`, so generic clients and MCP continuations follow it like any list.
- `/businesses?q=` lists businesses whose name matches first, each tier in the site ranking (`sort=rank` keeps the plain ranking).
- An unknown path suggests endpoints under the closest first segment, typos included (`/event`, `/busineses`), at most eight.
- `/jobs?within=` outside 0 to 3650 days is a 400 instead of a 503. Markdown responses keep their header as one list, drop `format` from the JSON link and flag stale data.
- MCP: `discover_api` ranks the endpoint a topic names first (plural or singular, e.g. "river levels" finds `/rivers`); a missing identifier says what is missing and where current ones are listed (`error.hint`); garbage-day suggestions list the closest house numbers first.

## 1.1.0 (2026-10-05)

- New endpoints: `/events/months` and a `month=YYYY-MM` filter on `/events` (the site’s month pages); `/news/archive/{year}`; `/zoning/addresses` (civic address suggestions) and `/zoning/small-scale-housing`. `/maps/layers/{id}` takes `bbox` and `near`.
- `meta.updatedAt` is always a date-time with Z or an offset: sources dated only to a day, month or year give the start of that period in the city’s time zone, with `meta.updatedAtPrecision`. Transit departures add ISO `scheduledAt`/`expectedAt` next to the epoch-millisecond values; air stations add `pm25Avg24h` (same value as `pm25_24`).
- Every OpenAPI operation has a response example (hand-written or a placeholder generated from its schema).
- MCP: focused tools for news, jobs, weather, address zoning, garbage day and bus stops; event month and date filters; tool titles; two resources (usage guide, API catalogue) and two prompts (local briefing, address report); schema violations return the same structured `invalid_arguments` error as other failures; HTTP refusals use the API error shape. The server card lists the tools, resources, prompts and protocol version.

## 1.0.2 (2026-10-02)

- Responses carry `Last-Modified` (from `meta.updatedAt`) and the full `RateLimit-*` set is declared in OpenAPI; ETags now ignore `meta.ageSec`, so `If-None-Match` returns 304 whenever the data is unchanged.
- Discovery from the domain alone: `/.well-known/api-catalog` (RFC 9727), an MCP server card at `/.well-known/mcp/server-card.json`, and `/.well-known/security.txt`. A Postman collection at `/developers/postman.json`. OpenAPI documents error codes, the `If-None-Match` header and the versioning policy.

## 1.0.1 (2026-10-01)

- Full public API coverage through MCP discovery, filtered queries and bounded batches, with explicit partial results and actionable retry errors.
- Client setup and downloadable configurations at /developers/mcp/. City-aware examples, safer pagination, nested-array field selection and accessible code copying.

## 1.0.0 (2026-09-30)

- First public release: every module of PG Pulse as read-only JSON under /api/v1, with OpenAPI 3.1, Markdown, CSV and GeoJSON output, ETags and generous per-IP rate limits.
- Markdown versions of every page (/<page>.md, /md/<page>, or Accept: text/markdown), plus /llms.txt and /llms-full.txt.
