This guide is aimed at developers and web masters that would like to incorporate the Physical Address Geocoder into their applications and websites.
The BC Physical Address Online Geocoder REST API lets you integrate real-time standardization, validation, and geocoding of physical addresses into your own applications. This document defines aspects of the REST API that are not covered in the OpenAPI definition.
There are two breaking API changes but they only affect the occupants/addresses resource.
- In occupants/addresses, if no occupant separator ("**") is found in addressString, addressString is assumed to be an occupant name, not a civic address. In previous versions, if no frontGate ("--") was found, addressString was assumed to be a civic address.
- In occupants/addresses, fullAddress now includes an occupant separator "**" as in "Sir Jame Douglas Elementary ** 401 Moss St, Victoria, BC"
There is one breaking API change:
The following anonymous online geocoder URLs are deprecated, no longer supported and may be shut down in the future:
The Online Geocoder offers resources for validating and geocoding an address (including public and related business occupants); finding a given site, intersection, and occupant; and finding sites, intersections, and occupants near a point or within an area.
The current baseUrl for the online geocoder is:
This URL allows both public and gated access. Gated access requires an apikey. To get a sandbox apikey with a maximum rate of 1000 requests per minute, visit the geocoder api console. You can get an unrestricted apikey for use in government applications by contacting the DataBC Help Desk
CORS is enabled for any domain if you include an apikey with each request.
The addresses resource represents all addresses in the geocoder. A request on this resource to find a query address will return one or more matching addresses that are standardized and geocoded (i.e., given a point location on the earth).
A query address can be specified in two different ways:
- A single address string containing all elements of an address as in:
- Individual address elements as in:
Here are some more example geocoder requests:
- Geocode 456 Gorge Rd E, Victoria, BC
- Geocode 7-955 13th Ave, Valemount, BC
- Geocode the intersection at Johnson and Government
- Geocode 5671 Malibu Terrace, Nanaimo, BC and return results in GEOJSON and BC Albers projection
- Geocode 5670 Malibu Terrace, Nanaimo and return the location along the road centreline for using in routing
- Geocode 5670 Malibu Terrace, Nanaimo and return accessPoint set back four metres from the curb towards the inside of the property. Note that only accessPoints can be set back
- Geocode 5671 Malibu Terrace, Nanaimo, BC without interpolation. In other words, if the geocoder doesn’t have a site with a civic number of 5671, it will fail instead of looking for an address range that contains 5671
- Geocode 200 Gorge Rd W, Saanich, BC and limit results to Victoria. It will return 200 Gorge Rd E, Victoria, BC since Gorge Rd E is in Victoria
- Geocode 1434 Graham St, Kelowna, BC and limit results to ten matches within the greater Kelowna area
- Geocode 1434 Graham St, Kelowna, BC and limit results to ten street-level matches
- Extrapolate the known location of 12 Bushby St from a parcelPoint to get an accessPoint
The occupants/addresses resource represents all occupant addresses in the geocoder. A request on this resource to find a query address will return one or more matching occupants and their addresses.
- Find up to 10 schools named Sir James Douglas Elementary
- Find a school named Sir James Douglas Elementary in Victoria
The occupants/nearest resource represents the nearest site to a given point location
- Find the nearest courthouse to a given point
The addresses resource will return a document in the requested format and spatial reference system. Documents in formats that support a header record (e.g., XHTML, KML, GEOJSON, GEOJSONP, GML) will contain a single About Query representation describing the query and its execution, and one or more site address or intersection address representations. Documents in formats that don’t support a header record (e.g., CSV, SHPZ), will contain one or more site/intersection address representations.
The occupants/addresses resource is similar to the addresses resource. Its response will include an About Query representation plus one site representation and occupant representation for each address matched.