Source: https://developers.woosmap.com/api-reference/distance-api/get-distance-isochrone-json/

> For clean Markdown of any page, append `.md` to the page URL.

> For a complete documentation index, see https://developers.woosmap.com/llms.txt

# Calculate Isochrone



# Calculate Isochrone

 GET 
https://api.woosmap.com/distance/isochrone/json

Find all destinations that can be reached in a specific amount of time or a maximum travel distance.

**Rate limit** : `10/1s`

**Ratelimit:** 10/1s

### Authorization

[`key`](#authorization-distance-publicapikey)
apiKeyquery

Public key of the project usually starts with `woos-`

[`private_key`](#authorization-distance-privateapikey)
apiKeyquery

Private key with or without write permission.

[`X-Api-Key`](#authorization-distance-privateapikeyheader)
apiKeyheader

Private key with or without write permission.

### Query Parameters

[`mode`](#query-mode)
stringDefaults to `driving`

Specifies the mode of transport to use for the calculation.

Available options:`driving`, `walking`, `cycling`

[`method`](#query-method)
stringDefaults to `time`

Specifies how to compute the route between the start point and the end point:

- `time`: fastest route 
- `distance`: shortest route

Available options:`time`, `distance`

[`units`](#query-units)
stringDefaults to `metric`

Specifies the unit system to use when displaying results.

Available options:`metric`, `imperial`

[`language`](#query-language)
stringDefaults to `en`

The language code, indicating in the language the response should be in.

If not defined the header `Accept-Language` of the request will be checked before defaulting to `en`.

# Show 20 enum values Hide 20 enum values 

`en`

`fr`

`ca`

`da`

`de`

`es`

`et`

`fi`

`he`

`it`

`ja`

`nb`

`nl`

`pl`

`pt`

`ro`

`ru`

`sv`

`uk`

`zh`

[`avoid`](#query-avoid)
object

A list of features that you want to avoid. Valid values are `tolls`, `highways`, `ferries` or polygons coordinates whose vertex latlng are separated by a semicolon `;`.

To add multiple features, separate them with the pipe `|` character.

Example:`tolls`

[`origin`](#query-origin)
stringrequired

The starting point. It should be supplied in the form of `latitude,longitude` coordinates. Ensure that no space exists between the latitude and longitude values.

Example:`48.709,2.403`

[`value`](#query-value)
numberrequired

The value to use for the isochrone contour.

If you specified `time` for `method` this value should be number of minutes

If you specified `distance` for `method` this value should be distance in kilometers.

### Header Parameters

[`accept-language`](#header-accept-language)
object

### Response

200application/json

Successful Response

[`status`](#resp-200-status)
stringDefaults to `OK`

The status of the response

- `OK`: The response contains a valid result.
- `INVALID_REQUEST`: The request could not be processed.
- `MAX_ELEMENTS_EXCEEDED`: The product of origins and destinations exceeds the per-query limit (fixed at 200 elts/query).
- `MAX_ROUTE_LENGTH_EXCEEDED`: One of requested routes is too long and the matrix/route cannot be processed (The limit is 500km).
- `REQUEST_DENIED`: The API key provided is invalid or does not allow access to this service etc..
- `BACKEND_ERROR`: The server encountered an unexpected error.
- `OVER_QUERY_LIMIT`: The request was denied due to the rate limit (see [Usage Limits](https://developers.woosmap.com/products/distance-api/distance-matrix-endpoint/#usage-limits)).
- `ZERO_RESULTS`: No route could be found between the origin and destination.

# Show 8 enum values Hide 8 enum values 

`OK`

`INVALID_REQUEST`

`MAX_ELEMENTS_EXCEEDED`

`MAX_ROUTE_LENGTH_EXCEEDED`

`REQUEST_DENIED`

`BACKEND_ERROR`

`OVER_QUERY_LIMIT`

`ZERO_RESULTS`

[`isoline`](#resp-200-isoline)
IsolineResponseTime | IsolineResponseDistancerequired

### Errors

#401

Unable to locate credentials.

 

`application/json`

[`detail`](#err-401-detail)
stringrequired

#402

Out of free quota.

 

`application/json`

[`detail`](#err-402-detail)
stringrequired

#403

Credentials found, but not matching.

 

`application/json`

[`detail`](#err-403-detail)
stringrequired

#422

Validation Error

 

`application/json`

[`detail`](#err-422-detail)
object[]

Show 3 propertiesHide 3 properties

detail.[`loc`](#err-422-detail-loc)
any[]required

detail.[`msg`](#err-422-detail-msg)
stringrequired

detail.[`type`](#err-422-detail-type)
stringrequired

#429

Rate limit reached

 

`application/json`

[`details`](#err-429-details)
stringrequired

```shell
curl -L 'https://api.woosmap.com/distance/isochrone/json?origin=48.709%2C2.403&value=1&mode=driving&language=en&method=distance&key=YOUR_PUBLIC_API_KEY' \
-H 'Referer: http://localhost'
```

```javascript
const requestOptions = {
  method: "GET",
  redirect: "follow"
};

fetch("https://api.woosmap.com/distance/isochrone/json?origin=48.709%2C2.403&value=1&mode=driving&language=en&method=distance&key=YOUR_PUBLIC_API_KEY", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

```python
import requests

url = "https://api.woosmap.com/distance/isochrone/json?origin=48.709%2C2.403&value=1&mode=driving&language=en&method=distance&key=YOUR_PUBLIC_API_KEY"

payload = {}
headers = {
    'Referer': 'http://localhost'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```

```json
{
  "status": "OK",
  "isoline": {
    "origin": {
      "lat": 48.709,
      "lng": 2.403
    },
    "distance": {
      "value": 1,
      "text": "1 km"
    },
    "geometry": "s|ihHouuMZ`GdClCsA~QhCnQmBhEpCfF|HxGpBtFfEnBnHqJpH}ADaEcCaB@sBnEiEYiGmVyFaG{G[eFoCw@gAiIkDYg@_DwA@"
  }
}
```
