API Documentation
Complete reference for the Neighbourly API
Authentication
All requests require an API key in the header:
Authorization: Bearer YOUR_KEYDon't have an API key yet? Contact us to get started.
Geocoding
Forward Geocoding
GET /geocode
Convert an address to coordinates
Parameters
| Name | Type | Status | Description |
|---|---|---|---|
| address | string | Required | The address to geocode |
Example Request
curl -X GET "https://api.neighbourly.ca/geocode?address=123 Main St Ottawa ON" \
-H "Authorization: Bearer YOUR_KEY"Example Response
{
"lat": 45.4215,
"lng": -75.6972,
"confidence": 0.98,
"standardized_address": "123 Main St, Ottawa, ON K1X 2Y2"
}Reverse Geocoding
GET /reverse-geocode
Convert coordinates to an address
Parameters
| Name | Type | Status | Description |
|---|---|---|---|
| lat | number | Required | Latitude coordinate |
| lng | number | Required | Longitude coordinate |
Example Request
curl -X GET "https://api.neighbourly.ca/reverse-geocode?lat=45.4215&lng=-75.6972" \
-H "Authorization: Bearer YOUR_KEY"Example Response
{
"address": "123 Main St, Ottawa, ON K1X 2Y2",
"confidence": 0.95,
"components": {
"street_number": "123",
"street": "Main St",
"city": "Ottawa",
"province": "ON",
"postal_code": "K1X 2Y2"
}
}Address Standardization
POST /standardize
Clean and normalize an address to a standard format
Request Body
{
"address": "123 main street ottawa ontario"
}Example Request
curl -X POST "https://api.neighbourly.ca/standardize" \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"address": "123 main street ottawa ontario"}'Example Response
{
"standardized_address": "123 Main St, Ottawa, ON K1X 2Y2",
"confidence": 0.99,
"changes": [
"Capitalized street name",
"Added postal code",
"Standardized province abbreviation"
]
}Administrative Boundaries
GET /boundaries
Get administrative context for coordinates (province, region, municipality, neighbourhood)
Parameters
| Name | Type | Status | Description |
|---|---|---|---|
| lat | number | Required | Latitude coordinate |
| lng | number | Required | Longitude coordinate |
Example Request
curl -X GET "https://api.neighbourly.ca/boundaries?lat=45.4215&lng=-75.6972" \
-H "Authorization: Bearer YOUR_KEY"Example Response
{
"province": "Ontario",
"region": "Eastern Ontario",
"municipality": "Ottawa",
"neighbourhood": "Centretown"
}