Set your key once, then copy any command.
export GEOLITH_API_KEY=gc_sk_your_secret_key
AUTH="Authorization: Bearer $GEOLITH_API_KEY"
Search
curl -H "$AUTH" "https://api.geolith.app/v1/search?text=eiffel%20tower&size=1"
curl -H "$AUTH" "https://api.geolith.app/v1/search?text=mg%20road&boundary.country=IN&layers=address,venue&size=5"
Autocomplete
curl -H "$AUTH" "https://api.geolith.app/v1/autocomplete?text=shaniwar%20wa&focus.point.lat=18.5204&focus.point.lon=73.8567&size=5"
Structured search
curl -H "$AUTH" "https://api.geolith.app/v1/search/structured?address=Shaniwar%20Wada&locality=Pune&country=IN"
Reverse
curl -H "$AUTH" "https://api.geolith.app/v1/reverse?point.lat=18.922&point.lon=72.8347&size=1"
Nearby
curl -H "$AUTH" "https://api.geolith.app/v1/nearby?point.lat=18.5195&point.lon=73.8553&layers=venue&size=5"
Place
curl -H "$AUTH" "https://api.geolith.app/v1/place?ids=geolith:locality:16174445"
Tiles
curl -H "$AUTH" "https://api.geolith.app/v1/tiles/sample.json"
curl -H "$AUTH" -o tile.mvt "https://api.geolith.app/v1/tiles/sample/0/0/0.mvt"
Health and quota
curl "https://api.geolith.app/health"
# The quota headers on any answered request:
curl -s -D - -o /dev/null -H "$AUTH" "https://api.geolith.app/v1/search?text=pune" | grep -i x-quota
Pretty-print with | jq, or print only labels:
curl -s -H "$AUTH" "https://api.geolith.app/v1/search?text=pune&size=3" | jq -r '.features[].properties.label'