Skip to content

Errors

All error responses return a JSON object with a message field.

{
"message": "Description of what went wrong"
}

Some errors include additional fields for context:

{
"message": "Validation failed",
"errors": ["lat is required", "dataset is required"]
}
StatusCodeDescription
400Bad RequestMissing or invalid parameters. Check the message for details.
401UnauthorizedMissing x-api-key header.
403ForbiddenInvalid, expired, or suspended API key.
404Not FoundDataset not found, or no matching feature.
429Too Many RequestsRate limit or monthly quota exceeded. See Limits & Pricing.

Returned when required parameters are missing or values are invalid.

Terminal window
# Missing required parameter
curl -s "https://api.terranode.co/v1/pip?lat=40.7128" \
-H "x-api-key: YOUR_API_KEY"
{
"message": "lng is required"
}
Terminal window
# Invalid coordinate
curl -s "https://api.terranode.co/v1/pip?lat=999&lng=-74.006&dataset=us-states" \
-H "x-api-key: YOUR_API_KEY"
{
"message": "lat must be between -90 and 90"
}

Returned when you exceed your rate limit or monthly quota. The response includes headers to help you manage your usage:

HeaderDescription
Retry-AfterSeconds to wait before retrying

Rate limit exceeded: Wait and retry. The rate limit resets per second.

Monthly quota exceeded: Your quota resets on the 1st of each month at midnight UTC. Upgrade your tier for a higher limit.