Regain Control Over Cost With NextBillion.ai’s Distance Matrix API

Custom Distance Matrix API for your unique business needs —get accurate ETAs and Distances. Reduce the cost of scaling up your business and reach positive unit economics.

Trusted by Logo wrap
Banner

Key Benefits

Key Benefits

40% reduction
in costs

Key Benefits

Best-in-class
ETA accuracy

Key Benefits

10x higher
performance

Key Benefits

On-premise deployment supported

Key Benefits

ML-powered customization for use cases

Overview

Distance Matrix API computes travel times and distances between a set of origins and destinations — for one-to-many/many-to-many start and endpoints.

The API call returns a matrix of ETA and distances for each origin and destination pair.

D1 D2
01 TO1D1
DO1D1
TO1D2
DO1D2
02 TO2D1
DO2D1
TO2D2
DO2D2

*T = ETA in mins, D = Distance in kms

Distance Matrix API solves operations and routing challenges faced by logistics, shipping, delivery, fleet management, mobility and urban infrastructure companies by predicting accurate distances and arrival times.

Why NextBillion.ai Distance Matrix API

The existing plug-and-play APIs are not built for the modern enterprise’s needs.
They do not take take into account specific business needs the way NextBillion.ai does.

Customizable APIs mapped to your business

Computes accurate ETAs and Distances based on the vehicle type- trucks, minivans, cars, motorbikes or e-scooters – depending on business needs. Customizations also incorporates preferred routes, driving speed, traffic rules and regional nuances unlike the existing ready to use APIs

Distancematrix API Visual
Distancematrix API Visual

High volume at low cost

Route optimization demands the ability to call a very large number (eg: 500 origins, 500 destinations) of API calls at very low latencies. Besides the volume constraint, existing solutions come with a heavy price tag. With our Distance Matrix API, you can scale without worrying about price

NextBillion.ai vs Competitors

NextBillion.ai Competitors
Matrix size supported 5000 * 5000 25 * 25
Time-dependent routing Rule-based, time-dependent calculation integrated with map editing capabilities Not supported
Latency and throughput 2X-3X lower latency
10X-20X higher throughput
Average
Mode of deployment On-premise and cloud-agnostic deployment No on-premise deployment
Pricing Flexible, customized pricing for every business model Fixed, inflexible pricing

Industries that benefit from Distance Matrix API

With NextBillion.ai's AI and ML-powered Distance Matrix APIs:
Achieve operational efficiency | Improve unit economics | Increase gross margins

Logistics and Shipping

Logistics
and Shipping

On-demand Deliveries

On-demand
Deliveries

Fleet Management

Fleet
Management

Route Planning and Optimization

Route Planning
and Optimization

Ride Hailing

Ride
Hailing

Long Haul Trucking

Long Haul
Trucking

Easy to use and integrate

Distance Matrix API request

POST /distancematrix/json

Parameters

Name Required Type Description
origins ✅ Array Locations of origins
Format: lat0,lng0|lat1,lng1|…
Regex: ^[d.-]+,[d.-]+(|[d.-]+,[d.-]+)*$
destinations ✅ Array Locations of destinations
Format: lat0,lng0|lat1,lng1|…
Regex: ^[d.-]+,[d.-]+(|[d.-]+,[d.-]+)*$
mode String Mode of service.
Values:car|auto|bike|escooter|4w|2w….
Default: “”
departureTime Number Departure time.
Format: unix timestamp.
Unit: seconds.
Values : will depend on use case

API request example

 
{
    "departure_time": 0,
    "destinations": "1.34881159,103.8836298%7C1.33422437,103.88912296%7C1.3146602,103.8975343",
    "key": "string",
    "mode": "4w",
    "origins": "1.33388114,103.83195972%7C1.31483182,103.82904148%7C1.30333351,103.84878254"
}

API response example

 
{
"status":"Ok",
"rows":[
{"elements":[ {"duration":{"value":675},"distance":{"value":7868}},
{"duration":{"value":674},"distance":{"value":8201}},
{"duration":{"value":784},"distance":{"value":10963}}]},
{"elements":[{"duration":{"value":767},"distance":{"value":10301}},
{"duration":{"value":766},"distance":{"value":10633}},
{"duration":{"value":838},"distance":{"value":11766}}]},
{"elements":[{"duration":{"value":769},"distance":{"value":8465}},
{"duration":{"value":788},"distance":{"value":10459}},
{"duration":{"value":695},"distance":{"value":7981}}]}
]
}
READ THE API DOCS

Flexible Pricing Models

Choose a pricing option that’s right for your trucking needs

Pay as you go

Pricing based on volume of API calls or users

Subscription

Flat subscription fee with unlimited API calls for on-premise deployment

Customized

Pricing based on ML model deployed

Unbeatable Prices

Save up to 2.5X with NextBillion.ai’s Distance Matrix API

Number of elements per Month NB logo Google Maps
1 to 100K $1.80 $5.00
100K to 500K $1.50 $4.00
500K to 1M $1.20 -
1M to 5M $0.90 -

Volume-based pricing: Cost per thousand requests | By monthly usage volume | Prices shown in USD

Our Customers Love Us

Awards and Honors

The quality and impact of our solutions are exemplified by the user awards we’ve won.

Awards

Get closer to positive unit economics with
NextBillion.ai’s Distance Matrix API