These examples assume a server on localhost:4000. See Running to start one. All responses below are real, trimmed to one feature.
Search
curl 'http://localhost:4000/v1/search?text=eiffel%20tower&focus.point.lat=48.8566&focus.point.lon=2.3522&size=1'
{
"features": [
{
"geometry": {
"coordinates": [
2.3473009,
48.8489712
],
"type": "Point"
},
"properties": {
"confidence": 1.0,
"country": "France",
"country_code": "FR",
"county": "Paris",
"distance": 0.921,
"gid": "geolith:venue:7437554776554892439",
"id": "7437554776554892439",
"importance": 0.8188999891281128,
"label": "Eiffel Tower, Paris, Île-de-France, France",
"layer": "venue",
"locality": "Paris",
"name": "Eiffel Tower",
"region": "Île-de-France",
"source": "geolith"
},
"type": "Feature"
}
],
"geocoding": {
"attribution": "https://search.geolith.app/attribution",
"engine": {
"name": "geolith-search",
"version": "0.1.0"
},
"query": {
"ranking": "importance+distance",
"size": 1,
"text": "eiffel tower",
"tinql": "\"eiffel\" AND \"tower\""
},
"version": "0.2"
},
"type": "FeatureCollection"
}
Autocomplete
curl 'http://localhost:4000/v1/autocomplete?text=new%20yo&size=1'
{
"features": [
{
"geometry": {
"coordinates": [
-73.9928783,
40.7601365
],
"type": "Point"
},
"properties": {
"confidence": 0.5,
"country": "United States",
"country_code": "US",
"county": "New York County",
"gid": "geolith:venue:-7957820713129421077",
"id": "-7957820713129421077",
"importance": 0.9990000128746033,
"label": "New Dramatists, Manhattan, New York, United States",
"layer": "venue",
"locality": "Manhattan",
"name": "New Dramatists",
"region": "New York",
"source": "geolith"
},
"type": "Feature"
}
],
"geocoding": {
"attribution": "https://search.geolith.app/attribution",
"engine": {
"name": "geolith-search",
"version": "0.1.0"
},
"query": {
"ranking": "importance",
"size": 1,
"text": "new yo",
"tinql": "\"new\" AND yo*"
},
"version": "0.2"
},
"type": "FeatureCollection"
}
Reverse
curl 'http://localhost:4000/v1/reverse?point.lat=48.8584&point.lon=2.2945&size=1'
{
"features": [
{
"geometry": {
"coordinates": [
2.2944247,
48.8583885
],
"type": "Point"
},
"properties": {
"country": "France",
"country_code": "FR",
"county": "Paris",
"distance": 0.006,
"gid": "geolith:venue:679858559648361093",
"id": "679858559648361093",
"importance": 0.512499988079071,
"label": "Paris, France Eu, Paris, Île-de-France, France",
"layer": "venue",
"locality": "Paris",
"name": "Paris, France Eu",
"region": "Île-de-France",
"source": "geolith"
},
"type": "Feature"
}
],
"geocoding": {
"attribution": "https://search.geolith.app/attribution",
"engine": {
"name": "geolith-search",
"version": "0.1.0"
},
"query": {
"boundary.circle.radius": 1.0,
"point.lat": 48.8584,
"point.lon": 2.2945,
"size": 1
},
"version": "0.2"
},
"type": "FeatureCollection"
}
Explore the API
Open http://localhost:4000/docs for an interactive reference generated from the handlers, or fetch http://localhost:4000/openapi.json.