Skip to content

Getting Started

Spatial operations API. Point-in-polygon, nearest neighbor, distance, and spatial joins — on pre-loaded US boundary datasets or your own data.
  1. Sign up at app.terranode.co

    Enter your email. You’ll receive a 6-digit verification code. No credit card required.

  2. 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.

  3. 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"
    }
  4. 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 .
OperationDescriptionEndpoint
Point in PolygonFind which polygon contains a pointGET /v1/pip
NearestFind the N closest features to a pointGET /v1/nearest
DistanceGeodesic distance between two pointsGET /v1/distance
Spatial JoinEnrich points with polygon attributesPOST /v1/spatial-join
DatasetsUpload and manage your own datasetsPOST /v1/datasets
UsageCheck your quota and rate limitsGET /v1/usage

All operations work on pre-loaded US boundary datasets (states, counties, ZIP codes, Census tracts, and more) or your own uploaded data.

https://api.terranode.co/v1

All endpoints require the /v1 version prefix. Requests without it return 400.

Every request requires an x-api-key header. See Authentication.