API Documentation
Boundary ¶
Overview
Boundaries represent geographic areas (countries, cities, neighborhoods, postal codes) stored as GeoJSON geometries.
Clients can search for boundaries by name (autocomplete/suggestions), then use the returned GeoJSON
to pass to endpoints like /valerts or draw on a map.
Search boundaries ¶
Search boundariesGET/boundaries/search{?q}
q (string, optional) - Search query for boundary name (e.g. “Dallas”, “90210”)
boundary_type (string, optional) - Filter by type: country, city, neighborhood, or postal_code
country (string, optional) - Filter by country code (e.g. “US”, “CA”, “MX”)
state (string, optional) - Filter by state/province name (e.g. “Texas”, “Ontario”)
limit (integer, optional) - Maximum number of results (default: 50)
start (integer, optional) - Offset for pagination (default: 0)
Example URI
- q
string(required) Example: Test Neighborhood
200Body
{
"code": "OK",
"data": [
{
"id": "b06ab2f5-365a-42ae-8d0c-0ad8f2505dd2",
"external_id": "relation/999001",
"boundary_type": "neighborhood",
"title": "Test Neighborhood",
"country": "US",
"state": "Texas",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-96.8,
32.78
],
[
-96.79,
32.78
],
[
-96.79,
32.79
],
[
-96.8,
32.79
],
[
-96.8,
32.78
]
]
]
},
"center": {
"type": "Point",
"coordinates": [
-96.795,
32.785
]
},
"created_at": 1775341971.530653,
"updated_at": 1775341971.530653,
"type": "boundary"
}
],
"info": {
"count": 1,
"total": 1
}
}Search by type ¶
Search by typeGET/boundaries/search{?boundary_type}
Example URI
- boundary_type
string(required) Example: neighborhood
200Body
{
"code": "OK",
"data": [
{
"id": "b06ab2f5-365a-42ae-8d0c-0ad8f2505dd2",
"external_id": "relation/999001",
"boundary_type": "neighborhood",
"title": "Test Neighborhood",
"country": "US",
"state": "Texas",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-96.8,
32.78
],
[
-96.79,
32.78
],
[
-96.79,
32.79
],
[
-96.8,
32.79
],
[
-96.8,
32.78
]
]
]
},
"center": {
"type": "Point",
"coordinates": [
-96.795,
32.785
]
},
"created_at": 1775341971.530653,
"updated_at": 1775341971.530653,
"type": "boundary"
}
],
"info": {
"count": 1,
"total": 1
}
}Search by country ¶
Search by countryGET/boundaries/search{?country}
Example URI
- country
string(required) Example: US
200Body
{
"code": "OK",
"data": [
{
"id": "b06ab2f5-365a-42ae-8d0c-0ad8f2505dd2",
"external_id": "relation/999001",
"boundary_type": "neighborhood",
"title": "Test Neighborhood",
"country": "US",
"state": "Texas",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-96.8,
32.78
],
[
-96.79,
32.78
],
[
-96.79,
32.79
],
[
-96.8,
32.79
],
[
-96.8,
32.78
]
]
]
},
"center": {
"type": "Point",
"coordinates": [
-96.795,
32.785
]
},
"created_at": 1775341971.530653,
"updated_at": 1775341971.530653,
"type": "boundary"
}
],
"info": {
"count": 1,
"total": 1
}
}Get boundary by ID ¶
Get boundary by IDGET/boundaries/{id}
Returns a single boundary with full GeoJSON geometry and center point.
Example URI
- id
string(required) Example: b06ab2f5-365a-42ae-8d0c-0ad8f2505dd2
200Body
{
"code": "OK",
"data": {
"id": "b06ab2f5-365a-42ae-8d0c-0ad8f2505dd2",
"external_id": "relation/999001",
"boundary_type": "neighborhood",
"title": "Test Neighborhood",
"country": "US",
"state": "Texas",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-96.8,
32.78
],
[
-96.79,
32.78
],
[
-96.79,
32.79
],
[
-96.8,
32.79
],
[
-96.8,
32.78
]
]
]
},
"center": {
"type": "Point",
"coordinates": [
-96.795,
32.785
]
},
"created_at": 1775341971.530653,
"updated_at": 1775341971.530653,
"type": "boundary"
}
}