Truck Routing API
Send loaded vehicle dimensions and weight with each request to calculate a truck route.
- Request credits
- 1 credit per started block of 10 input points, including origin and destination.
- Required scopes
route
Usage and limits
2–20 points, subject to plan limits; up to 1,000 km, snapping within 250 m and 10 requests/minute/key. Height, width and length in metres; loaded total and heaviest-axle weight in metric tonnes; axle count includes trailers. Static road restrictions. Conditional bans, hazardous goods, live traffic, truck matrices and fleet optimization are outside this release. Follow posted road signs and local rules.
Supported countries: Azerbaijan, Armenia, Georgia, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, Uzbekistan, Mongolia, Türkiye, Iran, Iraq, Syria, Jordan, Lebanon, Israel, Palestinian Territories, Yemen, Saudi Arabia, United Arab Emirates, Qatar, Kuwait, Bahrain, Oman, Afghanistan, Pakistan.
Worldwide Truck coverage is being prepared. The supported countries listed above remain the current live coverage until the new dataset passes acceptance and is released.
How the fuel estimate works
For Truck Routing, add this optional fuel object to the existing request. Loaded weight comes from vehicle.weight_t and distance from the returned road route; do not send a separate fuel distance or loaded weight. Without fuel, the route response stays unchanged. Standalone REST and MCP estimates cost 1 credit; adding fuel to Truck costs no extra credits.
{
"fuel": {
"empty_weight_t": 12,
"full_weight_t": 40,
"empty_l_per_100km": 20,
"full_l_per_100km": 34,
"price_per_liter": "1.10",
"currency": "AZN"
}
}This is a linear estimate based on your calibration. Speed, road gradient, traffic, wind, idling and driving style are excluded. No validated error percentage is available. Fuel prices are supplied by you; currencies are not converted. Results are estimates, not a payment or a guaranteed fuel bill.
MCP: estimate_fuel
Request example
Send your key in the Authorization: Bearer header. Coordinates use [longitude, latitude]. Set OSRMROUTE_API_KEY locally; for dataset queries, set DATASET_ID to an owned dataset UUID. Never expose a Studio key in browser code.
curl --fail-with-body -X POST "https://osrmroute.com/api/v1/truck/route" \
-H "Authorization: Bearer $OSRMROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"points":[[49.8671,40.4093],[49.849,40.378]],"vehicle":{"height_m":4,"width_m":2.55,"length_m":16.5,"weight_t":30,"axle_load_t":10,"axle_count":5}}'