Geo & Travel

Geo Distance API

Compute the great-circle distance between two coordinates in kilometers or miles.

Request Headers

Name Required Description
X-RapidAPI-Key required Your RapidAPI key. Get one free.
X-RapidAPI-Host required geo-distance.p.rapidapi.com

Endpoints

GET /v1/geo/distance

Great-circle distance between two coordinates

Parameters

NameTypeRequiredDefaultConstraints
lat1numberrequired—-90-90
lat2numberrequired—-90-90
lon1numberrequired—-180-180
lon2numberrequired—-180-180
unitstringoptionalkmmatches km|mi

Code Examples

curl --request GET \
  --url 'https://geo-distance.p.rapidapi.com/v1/geo/distance?lat1=0&lat2=0&lon1=0&lon2=0' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: geo-distance.p.rapidapi.com'
GET /v1/geo/distance/units

List all supported distance units.

Code Examples

curl --request GET \
  --url 'https://geo-distance.p.rapidapi.com/v1/geo/distance/units' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: geo-distance.p.rapidapi.com'

Interactive Example

geo-distance
$ GET /v1/geo/distance?lat1=51.5074&lon1=-0.1278&lat2=48.8566&lon2=2.3522
{"distance":343.56,"unit":"km"}

Subscribe & License

Access this API with commercial-ready tiers on RapidAPI. Flexible plans designed for side-projects, startups, and high-volume production architectures.

View Pricing & Subscribe

Developer Support

Need help integrating or have a custom endpoint request? Our engineering team is here to assist with authentication, payload schemas, and high-frequency rate limit increases.

Contact API Engineering

System Performance

Monitored 24/7 with a 99.9% uptime SLA. Built atop cloud-native microservices with globally distributed edge caching to ensure ultra-low latency response times.

All Systems Operational