Places near a point
GET https://api.trailsplits.com/search/v1/reverse
Checked by a live probe Key optional · 500 credits a day without one
The nearest named places to a point, nearest first, with their distance in metres. Narrow to kinds (for example peak,hut,village) and widen the radius up to 50 km.
Example
# Without a key, leave out the Authorization line (500 credits a day per address).
curl --fail-with-body 'https://api.trailsplits.com/search/v1/reverse?lat=46.0207&lon=7.7491&limit=3' \
-H "Authorization: Bearer $TRAILSPLITS_API_KEY" Parameters
| Name | In | Description |
|---|---|---|
latrequired | query | Latitude. |
lonrequired | query | Longitude. |
limit | query | Results. |
radius_m | query | Search radius in metres. |
kinds | query | Comma-separated kinds to keep. |
Response
| Field | Type | Description |
|---|---|---|
lat | number | |
lon | number | |
radius_m | number | |
features | array |
Full response schema (JSON Schema)
{
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"lon": {
"type": "number"
},
"radius_m": {
"type": "number"
},
"features": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"kind": {
"type": "string"
},
"center": {
"type": "array",
"items": {
"type": "number"
}
},
"distance_m": {
"type": "number"
},
"region": {
"type": "string",
"nullable": true
}
},
"required": [
"id",
"name",
"kind",
"center",
"distance_m"
]
}
}
},
"required": [
"lat",
"lon",
"radius_m",
"features"
]
}Errors
400, plus the gateway's 401, 429 and 503 (error conventions). A refused request costs no credits.