---
title: "Calculate distance between lats/longs"
method: GET
path: "/distance"
tags: ["Services APIs"]
---

# Calculate distance between lats/longs

`GET /distance`

This webservice is providing you the ability to calculate the distance between 2 lat/long points, it returns you the value in km or miles

## Query parameters

- `locationA` string, required
- `locationB` string, required
- `unit` 'kms' | 'miles'

## Response `200`

Success

- DistanceResponse — This section provides response schema of pong response
  - `count` integer
  - `data` number — Here is the distance between latlong A and latlong B, in the requested unit
  - `message` string
  - `status` string — Status of the response

## Other responses

- `403` — Forbidden
- `500` — The error message object

---

[API](https://skmtc.net/monvoyagepascher/apis/mon-voyage-pas-cher.md) · [All operations](https://skmtc.net/monvoyagepascher/apis/mon-voyage-pas-cher/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/monvoyagepascher/mon-voyage-pas-cher/versions/4a79ddd6213e/schema)
