Find an API

Search public APIs with auth details & Postman guides

← All APIs

Natural Resources Canada (NRCan) Geospatial APIs

nrcan.gc.ca · Government

Government No Auth Free & Open Government Energy & Utilities Real Estate Geospatial Energy Mining

Suite of open geospatial APIs from Natural Resources Canada covering topographic data, elevation, geology, seismic hazard, flood risk, energy infrastructure, and forest data. Includes the GeoGratis data catalog and the Federal Geospatial Platform (FGP) APIs. Key for flood and earthquake risk modeling used in P&C insurance. Data conforms to ISO and OGC geospatial standards.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Geocode a Canadian address

Geocodes a Canadian address string to lat/long coordinates using the NRCan geocoder. Returns matched address components and confidence score.

https://geogratis.gc.ca/services/geolocation/en/locate?q=299 Bremner Blvd, Toronto, Ontario&maxRows=5

Hover any highlighted part to learn what it does

curl -X GET "https://geogratis.gc.ca/services/geolocation/en/locate?q=299%20Bremner%20Blvd%2C%20Toronto%2C%20Ontario&maxRows=5"
import requests
params = {
    "q": "299 Bremner Blvd, Toronto, Ontario",
    "maxRows": "5"
}
response = requests.get(
    "https://geogratis.gc.ca/services/geolocation/en/locate",
    params=params,
)
print(response.json())
const url = new URL('https://geogratis.gc.ca/services/geolocation/en/locate');
url.searchParams.set('q', '299 Bremner Blvd, Toronto, Ontario');
url.searchParams.set('maxRows', '5');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://geogratis.gc.ca/services/geolocation/en/locate")
	q := baseURL.Query()
	q.Set("q", "299 Bremner Blvd, Toronto, Ontario")
	q.Set("maxRows", "5")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://geogratis.gc.ca/services/geolocation/en/locate")
uri.query = URI.encode_www_form({
  "q" => "299 Bremner Blvd, Toronto, Ontario",
  "maxRows" => "5"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://geogratis.gc.ca/services/geolocation/en/locate?" . http_build_query([
    "q" => "299 Bremner Blvd, Toronto, Ontario",
    "maxRows" => "5"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Get elevation for coordinates

Returns ground elevation (altitude above sea level) for a given latitude/longitude. Useful for flood risk assessment.

https://geogratis.gc.ca/services/elevation/en/altitude?lat=45.4215&lon=-75.6972

Hover any highlighted part to learn what it does

curl -X GET "https://geogratis.gc.ca/services/elevation/en/altitude?lat=45.4215&lon=-75.6972"
import requests
params = {
    "lat": "45.4215",
    "lon": "-75.6972"
}
response = requests.get(
    "https://geogratis.gc.ca/services/elevation/en/altitude",
    params=params,
)
print(response.json())
const url = new URL('https://geogratis.gc.ca/services/elevation/en/altitude');
url.searchParams.set('lat', '45.4215');
url.searchParams.set('lon', '-75.6972');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://geogratis.gc.ca/services/elevation/en/altitude")
	q := baseURL.Query()
	q.Set("lat", "45.4215")
	q.Set("lon", "-75.6972")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://geogratis.gc.ca/services/elevation/en/altitude")
uri.query = URI.encode_www_form({
  "lat" => "45.4215",
  "lon" => "-75.6972"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://geogratis.gc.ca/services/elevation/en/altitude?" . http_build_query([
    "lat" => "45.4215",
    "lon" => "-75.6972"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key — all NRCan geospatial services are freely accessible
  2. Geocoding API: https://geogratis.gc.ca/services/geolocation/en/locate?q={address}
  3. Elevation API: https://geogratis.gc.ca/services/elevation/en/altitude?lat={lat}&lon={lon}
  4. Federal Geospatial Platform: https://maps.canada.ca/czs/index-en.html for discovery
  5. Seismic hazard data (for earthquake risk modeling): search.open.canada.ca — NRCan seismic
  6. National Road Network and postal boundary files available at geogratis.gc.ca
  7. Flood maps: Federal Flood Mapping Guidelines data via open.canada.ca

What can you build with Natural Resources Canada (NRCan) Geospatial APIs?

Natural Resources Canada (NRCan) Geospatial APIs is a Government API. Developers commonly use government APIs for:

  • surfacing public datasets in citizen-facing apps
  • building transparency and civic engagement tools
  • accessing legislation, court records, and official data
  • powering research and journalism tools
  • creating compliance and regulatory monitoring dashboards

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Natural Resources Canada (NRCan) Geospatial APIs is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗