NicoChatNicoChatDocsSearch the docs…
Sign in

Mapbox

How to connect with Mapbox

2026-08-12

Create an account: www.mapbox.com/

To create an API key, follow the link and the steps:

To create an API Access Token, go to: https://account.mapbox.com/access-tokens/. Once you have created your account, you will receive a Default access token, which indicates that your account is registered without any restrictions.

Integration setup

Access the Mapbox integration in the integration section. Enter your API key and check the status to make sure it has been verified.

You can access the Mapbox API inside the Flow Builder -> Create Action Node -> Integrations -> Mapbox API

Actions:

There are three actions: 1. Get Geocodes by Address, 2. Get Address by Geocodes, 3. Get Directions.

  • Get the Geocode by Address

You can obtain geocodes by entering the address and the country code.

Payload:

In the received Payload, you will get the coordinates in the geocodes path -> longitude and latitude.

{
"features": [
{
"properties": {
"feature_type": "address",
"full_address": "110 Washington Street, Saint Francis, Kansas 67756, United States",
"name": "110 Washington Street",
"name_preferred": "110 Washington Street",
"coordinates": {
"longitude": -101.800868,
"latitude": 39.77444,
"accuracy": "rooftop",
"routable_points": [...] // 1 items
},
{
"features": [
{
"properties": {
"feature_type": "address",
"full_address": "110 Washington Street, Saint Francis, Kansas 67756, United States",
"name": "110 Washington Street",
"name_preferred": "110 Washington Street",
"coordinates": {
"longitude": -101.800868,
"latitude": 39.77444,
"accuracy": "rooftop",
"routable_points": [...] // 1 items
},
  • Get the Address by Geocode

You can obtain an address by entering the latitude and longitude coordinates.

Payload:

In the Payload, you will get the full_address and, in the context, you will get the address, street, postal code, place, district, region and country.

{
"features": [
{
"properties": {
"feature_type": "address",
"full_address": "110 Washington Street, Saint Francis, Kansas 67756, United States",
"name": "110 Washington Street",
"name_preferred": "110 Washington Street",
"coordinates": {...}, // 4 keys
"place_formatted": "Saint Francis, Kansas 67756, United States",
"context": {
"address": {
"address_number": "110",
"street_name": "Washington Street",
"name": "110 Washington Street"
},
"street": {
"name": "Washington Street"
},
"postcode": {
"name": "67756"
},
"place": {
"name": "Saint Francis"
},
"district": {
"name": "Cheyenne County"
},
"region": {
"name": "Kansas",
"region_code": "KS",
"region_code_full": "US-KS"
},
"country": {
"name": "United States",
"country_code": "US",
"country_code_alpha_3": "USA"
} } } } ] }
{
"features": [
{
"properties": {
"feature_type": "address",
"full_address": "110 Washington Street, Saint Francis, Kansas 67756, United States",
"name": "110 Washington Street",
"name_preferred": "110 Washington Street",
"coordinates": {...}, // 4 keys
"place_formatted": "Saint Francis, Kansas 67756, United States",
"context": {
"address": {
"address_number": "110",
"street_name": "Washington Street",
"name": "110 Washington Street"
},
"street": {
"name": "Washington Street"
},
"postcode": {
"name": "67756"
},
"place": {
"name": "Saint Francis"
},
"district": {
"name": "Cheyenne County"
},
"region": {
"name": "Kansas",
"region_code": "KS",
"region_code_full": "US-KS"
},
"country": {
"name": "United States",
"country_code": "US",
"country_code_alpha_3": "USA"
} } } } ] }
  • Get Directions

You must enter the Latitude and the Longitude of both the Origin and the Destination. The distance comes in meters and the duration in seconds.

Distance: 36682.594➗1000 = 36.682594 Approx. = 36 km

Duration: 1611.287➗60 = 26.8547 Approx. = 27 min

Payload:

You will get the duration in seconds and the distance in meters.

legs -> waypoints, which are the directions from the origin to the direction.

{
"routes": [
{
"weight_name": "auto",
"weight": 1514.084,
"duration": 1611.287,
"distance": 36982.594,
"legs": [
{
"admins": [
{
"iso_3166_1_alpha3": "USA",
"iso_3166_1": "US"
}
],
"weight": 1514.084,
"duration": 1611.287,
"distance": 36982.594,
"summary": "TX 70, Farm to Market Road 57"
}
]
}
],
"waypoints": [
{
"distance": 12.3,
"location": [
-100.407636,
32.471248
]
},
{
"distance": 3.034,
"name": "Farm to Market Road 57",
"location": [
-100.253785,
32.721094
]
}
],
"code": "Ok",
"uuid": "T5m9XsITk8v43iczgJieSLlVKxksfje-2zgIGqC5NHYQjy8OlMRkVw=="
}
{
"routes": [
{
"weight_name": "auto",
"weight": 1514.084,
"duration": 1611.287,
"distance": 36982.594,
"legs": [
{
"admins": [
{
"iso_3166_1_alpha3": "USA",
"iso_3166_1": "US"
}
],
"weight": 1514.084,
"duration": 1611.287,
"distance": 36982.594,
"summary": "TX 70, Farm to Market Road 57"
}
]
}
],
"waypoints": [
{
"distance": 12.3,
"location": [
-100.407636,
32.471248
]
},
{
"distance": 3.034,
"name": "Farm to Market Road 57",
"location": [
-100.253785,
32.721094
]
}
],
"code": "Ok",
"uuid": "T5m9XsITk8v43iczgJieSLlVKxksfje-2zgIGqC5NHYQjy8OlMRkVw=="
}