7x will be shutting down on 1 September 2026. Read more.

Distance API

The 7x Distance API returns the great-circle distance between two points on Earth. Pass either two pairs of coordinates or two addresses and get the distance back in kilometres and miles.

Use it to estimate travel distance, group nearby records, build "nearest store" features or rank search results by proximity.

Common use cases

  • Show distance between a user and a list of stores or branches
  • "Nearest" or proximity-based search ranking
  • Estimate travel distance for logistics and delivery
  • Filter results within a configurable radius

Endpoints

MethodPathDescription
GET/distance/coordinatesGreat-circle distance between two latitude / longitude pairs.
GET/distance/addressGreat-circle distance between two postal addresses.

Try it - full API reference

Explore the OpenAPI specification below. Sign up for a free API key to make live requests.