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.
Request
Section titled “Request”GET /v1/enrichParameters (query string)
Section titled “Parameters (query string)”| Parameter | Type | Required | Description |
|---|---|---|---|
lat | number | Yes | Latitude in decimal degrees (WGS84). Range: -90 to 90. |
lng | number | Yes | Longitude in decimal degrees (WGS84). Range: -180 to 180. |
system_dataset | string | No | System dataset slug(s), comma-delimited (e.g., us-counties,us-states) |
dataset | string | No | Your dataset slug(s), comma-delimited |
dataset_id | string | No | Dataset UUID(s), comma-delimited |
radius | number | No | Expand 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.
Example — single dataset
Section titled “Example — single dataset”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 .Example — all datasets (discovery mode)
Section titled “Example — all datasets (discovery mode)”curl -s "https://api.terranode.co/v1/enrich?lat=40.7128&lng=-74.006" \ -H "x-api-key: YOUR_API_KEY" | jq .Response
Section titled “Response”{ "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"}Response fields
Section titled “Response fields”| Field | Description |
|---|---|
summary.datasets_queried | Number of datasets queried |
summary.datasets_matched | Number of datasets with at least one match |
summary.requests_charged | Number of requests charged against your monthly quota |
radius_m | Echo of the radius parameter (omitted when not provided) |
results[].dataset | Dataset slug or ID |
results[].type | "system" or "user" |
results[].version | Dataset version queried |
results[].match | true if at least one feature matched |
results[].intersections[].properties | The matched feature’s attributes |
results[].intersections[].on_boundary | true if the point falls on the polygon boundary |
results[].intersections[].distance_m | Distance to feature in meters (0 if point is inside) |
results[].intersections[].distance_mi | Distance to feature in miles |
errors[] | Per-dataset errors (dataset slug, type, and error message) |
Radius expansion
Section titled “Radius expansion”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.
curl -s "https://api.terranode.co/v1/enrich?lat=40.7128&lng=-74.006&radius=5000" \ -H "x-api-key: YOUR_API_KEY" | jq .Billing
Section titled “Billing”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.
Partial results
Section titled “Partial results”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.