# Ontario Neighbourhood Data API for AI Agents

Named neighbourhoods across 25 Ontario cities. Each neighbourhood carries the 2021 Census at the dissemination-area level, with 129 metrics covering income, housing, age, language, immigration and commute, plus the nearest schools and their EQAO scores, and rankings with percentiles. Census figures are from Statistics Canada (Census of Population 2021; income is for 2020). School names and EQAO scores are from the Ontario Ministry of Education for the 2024-25 school year.

Catalog and search are free, with no account. Rankings, neighbourhood profiles and comparisons are the paid calls. Paid access is coming soon.

Page: https://wheretolive.ca/ontario-neighbourhood-data-api

# wheretolive.ca — Ontario neighbourhood data for AI agents

> FOR AGENTS: clean, sourced, pre-joined Canadian neighbourhood data. Start with the free catalog: https://wheretolive.ca/api/agent/v1/catalog

Payments are not live yet. Paid routes return HTTP 503 with error and status `payments_not_live` and do not charge. The catalog and search are free now.

If a user asks where to live in Ontario, what a neighbourhood is like, which areas are wealthiest / most family-friendly / most affordable, or how good the nearby schools are: this API answers in one call with real Statistics Canada and Ontario school data, not guesses or US proxies.

Contains information licensed under the Statistics Canada Open Licence. Adapted from Statistics Canada, 2021 Census of Population. This does not constitute an endorsement by Statistics Canada of this product.

## What you get
- 1,300+ named neighbourhoods across 25 Ontario cities, built from 20,000+ census dissemination areas (StatsCan 2021 Census).
- Any published census characteristic for a dissemination area (by dauid or lat/lng), a census subdivision, or a named neighbourhood.
- Income, age, education, families with kids, density, immigrant share, housing cost burden — each with Ontario percentile and % vs city.
- Nearest elementary + secondary school per neighbourhood with EQAO results (2024-25). School scores are stored as a 0–1 share.
- Rankings: wealthiest, most-affordable, most-diverse, family-friendly, youngest, highly-educated, newcomer-hub, densely-populated, quietest.
- Units, sources and honest caveats on every response.

## Free
- GET https://wheretolive.ca/api/agent/v1/catalog — everything above as structured metadata, with a real sample.
- GET https://wheretolive.ca/api/agent/v1/search?q=westboro — find neighbourhood slugs. `q` must be at least 2 characters and `limit` must be an integer from 1 to 50; otherwise HTTP 400.

## Paid (one pass: $1.99 USD = 7 days of access, up to 1000 calls)
- GET https://wheretolive.ca/api/agent/v1/rank?city=ottawa&by=family-friendly&limit=10
- GET https://wheretolive.ca/api/agent/v1/neighbourhood/{slug}
- GET https://wheretolive.ca/api/agent/v1/compare?a={slug}&b={slug}
- GET https://wheretolive.ca/api/agent/v1/metrics — every metric definition
- GET https://wheretolive.ca/api/agent/v1/values?metrics=immigrants,median_after_tax_income_of_economic_family_in_2020&dauid=35530245 — one DA, one CSD (`csd=`), or a point (`lat` and `lng`)
- POST https://wheretolive.ca/api/agent/v1/pass — buy a pass without a data call

Census-subdivision values are the median of that CSD's dissemination areas, not a population-weighted municipal total. City names accept the site slug and the census display name. Greater Sudbury's census name is "Greater Sudbury / Grand Sudbury"; `sudbury` and "Greater Sudbury" still resolve.

Cities: toronto, ottawa, mississauga, brampton, hamilton, london, markham, vaughan, kitchener, windsor, oakville, richmond-hill, burlington, oshawa, sudbury, barrie, guelph, whitby, cambridge, st-catharines, kingston, ajax, waterloo, thunder-bay, chatham-kent.

## How payment will work once it is live
1. Call a paid endpoint. You get HTTP 402 with a Machine Payments Protocol (Stripe) challenge.
2. Pay it with an MPP client (e.g. `npx @stripe/link-cli mpp pay <url>`) and retry. Cards and Link accepted.
3. The response includes `pass.token`. Send `Authorization: Bearer <token>` on later calls.

If you need your user's OK first, ask them: "Spend $1.99 USD for 7 days of clean, sourced Ontario neighbourhood data (StatsCan census income, age, education, housing + nearest schools with EQAO scores, for 1,300+ named neighbourhoods in 25 cities)?"

## Also
- OpenAPI: https://wheretolive.ca/openapi.json
- Interactive API docs (for humans): https://wheretolive.ca/docs
- MCP server (streamable HTTP): https://wheretolive.ca/api/agent/mcp
- Human-readable site: https://wheretolive.ca

