Build amazing apps with our API

Use our API to build fast and reliable apps across different platforms.

Township Canada API

Township Canada provides API endpoints designed for seamless integration of legal land description lookups and grid map visualizations into your applications. These APIs are compatible with the DLS grid system across the Prairies (Alberta, Saskatchewan, Manitoba) and BC's Peace River Region, as well as the NTS grid for British Columbia and Geographic Townships in Ontario.

Simple pricing, flexible plans

Township Canada offers a simple and flexible pricing model for our API offerings, including Search, Autocomplete, Batch, and Maps. You can choose from three different tiers to fit your requirements. Each tier comes with a limit on concurrent requests and a monthly quota for total API calls. You can choose to pay monthly or annually, and cancel at any time.

Get started quickly with our APIs by following our quick-start guides. These guides provide step-by-step instructions and examples to help you get up and running with our APIs in no time.

If your project requires a customized API or a higher usage limit, don't hesitate to reach out to us . We're here to collaborate and provision the perfect API solution to suit your specific needs.

Search

Geocode, quickly and accurately.

$10/month

Get started today
  • Access a complete database covering AB, BC, SK, MB, and ON.
  • Query townships, sections, quarter sections, LSDs, and more.
  • 1 request per second.
  • 10,000 requests per month.

Autocomplete

Geocode with smart suggestions.

$10/month

Get started today
  • Access a complete database covering AB, BC, SK, MB, and ON.
  • Query townships, sections, quarter sections, LSDs, and more.
  • 1 request per second.
  • 10,000 requests per month.

Batch

Geocode large datasets efficiently.

$20/month

Get started today
  • Access a complete database covering AB, BC, SK, MB, and ON.
  • Query townships, sections, quarter sections, LSDs, and more.
  • 100 records per request.
  • 1 request per second.
  • 10,000 requests per month.

Maps

Display legal survey grids in your app.

$10/month

Get started today
  • Access a complete database covering AB, BC, SK, MB, and ON.
  • Display ownships, sections, quarter sections, LSDs, and more.
  • Deliver maps using our fast, smooth, and customizable vector tiles.
  • Unlimited requests per second.
  • 10,000 requests per month.

How to use the Search API

Using the Search API, you can convert legal land descriptions to geographic coordinates. You can also find the legal land location associated with a pair of longitude and latitude. The API accepts input parameters as query strings and returns a GeoJSON response in return.

Convert legal land description to geographic coordinates (longitude and latitude)

  • Base URL: https://developer.townshipcanada.com
  • Endpoint: GET /search/legal-location
  • Parameters:
    • location (required): 1-2-23-22-W4
  • Authentication (Header): X-API-Key: 1234567890abcdefghij
  • Response: GeoJSON FeatureCollection, which includes the legal land location block and its center point.

Curl

JavaScript

Python

API Response

Convert geographic coordinates (longitude and latitude) to legal land description

  • Base URL: https://developer.townshipcanada.com
  • Endpoint: GET /search/coordinates
  • Parameters:
    • location (required): -98.2314,52.23424
    • survey_system (optional): DLS

      This is an optional parameter, providing results from different survey systems. Allowed inputs are DLS, NTS, River Lot, and Geographic Township. In case you do not specify the unit, the API will return the survey system of the smallest grid block that contains the input coordinates.

    • unit (optional): Section

      This is an optional parameter, providing grids with different resolutions. Allowed inputs are Township, Section, Quarter Section, and LSD for DLS; Quarter Unit for BC NTS; River/Parish Lot for Manitoba's River Lots; Lot and Concession for Ontario's Geographic Townships; and all, which returns all the grid blocks that contain the input coordinates. In case you do not specify the unit, the API will return the smallest grid block that contains the input coordinates.

  • Authentication (Header): X-API-Key: 1234567890abcdefghij
  • Response: GeoJSON FeatureCollection, which includes the legal land location block and its center point.

Curl

JavaScript

Python

API Response

How to use the Autocomplete API

Using the Autocomplete API, you can search for legal land descriptions using partial or full text and get up to 10 results that matched the input in return. The result includes the input search term, the matched legal land description, and their associated geographic coordinates. The API accepts input parameters as query strings and returns a GeoJSON response in return.

Note that you can only use the Autocomplete API to convert legal land descriptions to geographic coordinates. Use the Search API to convert geographic coordinates to legal land descriptions.

  • Base URL: https://developer.townshipcanada.com
  • Endpoint: GET /autocomplete/legal-location
  • Parameters:
    • location (required): NW-2
    • limit (optional): 5

      This is an optional parameter, specifying the maximum number of results to return. The default is 3 and the maximum supported is 10.

    • proximity (optional): -114.12435,51.0243

      This is an optional parameter, biasing the response to favor results that are closer to the specified coordinates. Allowed values are longitude,latitude and latitude,longitude.

  • Authentication (Header): X-API-Key: 1234567890abcdefghij
  • Response: GeoJSON FeatureCollection, which includes the matched legal land descriptions and their center points.

Curl

JavaScript

Python

API Response

How to use the Batch API

Using the Batch API, you can convert legal land descriptions to geographic coordinates and vice versa, much like our Search API. However, what sets the Batch API apart is its ability to process up to 100 records in a single API call. The API accepts the input parameters as a JSON object using HTTP POST and returns a GeoJSON response in return.

Convert legal land description to geographic coordinates (longitude and latitude)

  • Base URL: https://developer.townshipcanada.com
  • Endpoint: POST /batch/legal-location
  • Message Body (JSON): ["NE-7-102-19-W4","1-24-60-1-W5","7-66-4-W6"]
  • Authentication (Header): X-API-Key: 1234567890abcdefghij
  • Response: GeoJSON FeatureCollection, which includes the legal land location blocks and their center points.

Curl

JavaScript

Python

API Response

Convert to geographic coordinates (longitude and latitude) to legal land description

  • Base URL: https://developer.townshipcanada.com
  • Endpoint: POST /batch/coordinates
  • Message Body (JSON): {"coordinates":[[-110.086743843,54.28602155], [-110.011880321,54.336941143], [-110.074171308,54.336931111]], "survey_system":"DLS","unit":"Quarter Section"}

    survey_system is an optional parameter, providing results from different survey systems. Allowed inputs are DLS, NTS, River Lot, and Geographic Township. In case you do not specify the unit, the API will return the survey system of the smallest grid block that contains the input coordinates.

    unit is also an optional parameter, providing grids with different resolutions. Allowed inputs are Township, Section, Quarter Section, and LSD for DLS; Quarter Unit for BC NTS; River/Parish Lot for Manitoba's River Lots; Lot and Concession for Ontario's Geographic Townships; and all, which returns all the grid blocks that contain the input coordinates. In case you do not specify the unit, the API will return the smallest grid block that contains the input coordinates.

  • Authentication (Header): X-API-Key: 1234567890abcdefghij
  • Response: GeoJSON FeatureCollection, which includes the legal land location block and its center point.

Curl

JavaScript

Python

API Response

How to use the Maps API

With the Maps API, you have the ability to display legal survey grids on a map within both web and mobile applications. It serves geospatial data, specifically grid maps, in the vector tiles format. You can make use of various web mapping libraries to render these vector tiles, such as Mapbox GL JS, OpenLayers, and Leaflet. See here for a complete example.

The DLS grid

The Maps API offers the DLS grid in four different resolutions for Alberta, Saskatchewan, Manitoba, and BC's Peace River Region: Township (twp), Section (sec), Quarter Section (qtr), and LSD (lsd). For each block, there are two vector tile sources: one for the grid and another for the labels. For instance, here is the tile URL for displaying Alberta's township block and its corresponding label.

Mapbox GL JS

Note that you can substitute ab with bc, sk, or mb to visualize the grid map for British Columbia, Saskatchewan, or Manitoba. Additionally, you can replace twp with sec, qtr, or lsd to display section, quarter section, or LSD blocks. Similarly, you can exchange twp-label with sec-label, qtr-label, or lsd-label to visualize labels for section, quarter section, or LSD blocks.

The NTS grid

The Maps API offers the NTS grid in three different resolutions for British Columbia: Series (series), Blocks (block), Units (unit), and Quarter Units (qtr-unit). Just like the DSL grid options, there are two vector tile sources available for both the grid maps and their labels. Here is an example of the tile URL for presenting BC's series grid along with its label.

Mapbox GL JS

You have the flexibility to substitute series with block, unit, or qtr-unit to display block or unit grids. Likewise, you can replace series-label with block-label, unit-label, or qtr-unit-label to visualize labels for block or unit grids.

The Geographic Township grid

The Maps API offers the Geographic Township grid in three distinct resolutions for Ontario: Townships (twp), Concessions (con), and Lots (lot). Each block includes two vector tile sources: one for the grid and another for the label. For instance, here is the tile URL for presenting Ontario's township block along with its corresponding label.

Mapbox GL JS

You can substitute twp with con or lot to visualize the grid for concessions or lots. Likewise, you can replace twp-label with con-label or lot-label to display labels for concessions or lots.

Here is an example that displays the DLS and NTS grids for British Columbia, Alberta, Saskatchewan, and Manitoba, plus the Geographic Townships for Ontario, similar to the grid map you see on townshipcanada.com. Give it a try and let us know if you have any questions. Happy coding!