Skip to content

Enrich

Send a location and get back what you need to know about it — flood zone, county, school district, nearest fire station — without understanding spatial operations. Query one dataset, several, or all of them in a single call.

GET /v1/enrich
ParameterTypeRequiredDescription
latnumberYesLatitude in decimal degrees (WGS84). Range: -90 to 90.
lngnumberYesLongitude in decimal degrees (WGS84). Range: -180 to 180.
system_datasetstringNoSystem dataset slug(s), comma-delimited (e.g., us-counties,us-states)
datasetstringNoYour dataset slug(s), comma-delimited
dataset_idstringNoDataset UUID(s), comma-delimited
radiusnumberNoExpand the search area around the point (meters, up to 500,000)

Dataset selection: Provide at most one of system_dataset, dataset, or dataset_id. Omit all three for all-dataset mode, which queries every available system dataset plus your ready user datasets.

Terminal window
curl -s "https://api.terranode.co/v1/enrich?lat=40.7128&lng=-74.006&system_dataset=us-counties" \
-H "x-api-key: YOUR_API_KEY" | jq .
Terminal window
curl -s "https://api.terranode.co/v1/enrich?lat=40.7128&lng=-74.006" \
-H "x-api-key: YOUR_API_KEY" | jq .
{
"summary": {
"datasets_queried": 2,
"datasets_matched": 2,
"requests_charged": 2
},
"results": [
{
"dataset": "us-counties",
"type": "system",
"version": 1,
"match": true,
"intersections": [
{
"properties": {
"STATEFP": "36",
"COUNTYFP": "061",
"GEOID": "36061",
"NAME": "New York",
"NAMELSAD": "New York County"
},
"on_boundary": false,
"distance_m": 0,
"distance_mi": 0
}
]
},
{
"dataset": "us-states",
"type": "system",
"version": 1,
"match": true,
"intersections": [
{
"properties": {
"STATEFP": "36",
"STUSPS": "NY",
"NAME": "New York"
},
"on_boundary": false,
"distance_m": 0,
"distance_mi": 0
}
]
}
],
"errors": [],
"latency_ms": 23,
"api_version": "v1",
"semantics_version": "0.1.0"
}
FieldDescription
summary.datasets_queriedNumber of datasets queried
summary.datasets_matchedNumber of datasets with at least one match
summary.requests_chargedNumber of requests charged against your monthly quota
radius_mEcho of the radius parameter (omitted when not provided)
results[].datasetDataset slug or ID
results[].type"system" or "user"
results[].versionDataset version queried
results[].matchtrue if at least one feature matched
results[].intersections[].propertiesThe matched feature’s attributes
results[].intersections[].on_boundarytrue if the point falls on the polygon boundary
results[].intersections[].distance_mDistance to feature in meters (0 if point is inside)
results[].intersections[].distance_miDistance to feature in miles
errors[]Per-dataset errors (dataset slug, type, and error message)

Without radius, only geometric intersections match (containment for polygons, exact location for points/lines). With radius, returns all features within that distance — essential for point and line target datasets.

Terminal window
curl -s "https://api.terranode.co/v1/enrich?lat=40.7128&lng=-74.006&radius=5000" \
-H "x-api-key: YOUR_API_KEY" | jq .

Each dataset queried counts as one request against your monthly quota. A single-dataset enrichment costs 1 request. An all-dataset enrichment that queries 8 datasets costs 8 requests. The requests_charged field in the response confirms the cost.


If one dataset fails to load while others succeed, the successful results are still returned. The failed dataset appears in the errors array. This ensures a single dataset issue doesn’t block the entire response.