Getting Started
Spatial operations API. Point-in-polygon, nearest neighbor, distance, and spatial joins — on pre-loaded US boundary datasets or your own data.
Your first query in 5 minutes
Section titled “Your first query in 5 minutes”-
Sign up at app.terranode.co
Enter your email. You’ll receive a 6-digit verification code. No credit card required.
-
Get your API key
After verifying, your API key is displayed and emailed to you. It looks like
tn_.... Save it — you’ll need it for every request. -
Make a point-in-polygon query
Which county contains the Empire State Building?
Terminal window curl -s "https://api.terranode.co/v1/pip?lat=40.7484&lng=-73.9856&system_dataset=us-counties" \-H "x-api-key: YOUR_API_KEY" | jq .{"match": true,"matches": [{"properties": {"STATEFP": "36","COUNTYFP": "061","GEOID": "36061","NAME": "New York","NAMELSAD": "New York County","STUSPS": "NY","STATE_NAME": "New York","LSAD": "06","ALAND": 58683879,"AWATER": 29010416},"boundary": false}],"dataset": "us-counties","api_version": "v1"} -
Try a spatial join
Enrich a list of points with county data in one call:
Terminal window curl -s -X POST "https://api.terranode.co/v1/spatial-join?system_dataset=us-counties" \-H "x-api-key: YOUR_API_KEY" \-H "Content-Type: application/json" \-d '[{"lat": 40.7484, "lng": -73.9856, "id": "empire-state"},{"lat": 34.0522, "lng": -118.2437, "id": "la-city-hall"}]' | jq .
What you can do
Section titled “What you can do”| Operation | Description | Endpoint |
|---|---|---|
| Point in Polygon | Find which polygon contains a point | GET /v1/pip |
| Nearest | Find the N closest features to a point | GET /v1/nearest |
| Distance | Geodesic distance between two points | GET /v1/distance |
| Spatial Join | Enrich points with polygon attributes | POST /v1/spatial-join |
| Datasets | Upload and manage your own datasets | POST /v1/datasets |
| Usage | Check your quota and rate limits | GET /v1/usage |
All operations work on pre-loaded US boundary datasets (states, counties, ZIP codes, Census tracts, and more) or your own uploaded data.
Base URL
Section titled “Base URL”https://api.terranode.co/v1All endpoints require the /v1 version prefix. Requests without it return 400.
Every request requires an x-api-key header. See Authentication.