Ask anyone who has run OSRM in production and they will tell you the same story: the routing engine is wonderful, and the server it runs on is a monster. The planet-wide graph wants 128 GB of RAM and a day of preprocessing. Even a Southeast Asia extract — the region many of us actually ship for — means tens of gigabytes of memory, multi-hour osrm-extract runs, and a recurring maintenance chore every time OpenStreetMap data is refreshed.
There is a hidden tax beyond the hardware, too. Someone has to babysit the pipeline: re-run the preprocessing when the OSM extract updates, watch memory pressure at query time, and remember how the whole contraption works six months later when the extract server quietly dies at 3 a.m. For a small team, that time and money is better spent on the thing customers actually see.
Then you realize all of that is table stakes. It is not your product. You just needed turn-by-turn directions between two coordinates.
The alternative: an API that already did the hard part
JustRouting is a hosted routing API tuned for Southeast Asia. Under the hood it runs the same open-source engines you would self-host — OSRM for directions and matrices, VROOM for fleet optimization — but the 128 GB server, the preprocessing pipeline, and the map updates are somebody else's problem.
The interesting parts:
- Directions, distance matrices, map matching, trips, nearest-road lookup, geocoding, and fleet optimization — the full routing toolbox, one API key.
- Two profiles: car and motorcycle. Motorcycle routing is a real thing in Southeast Asia, and almost no global provider gets it right. This one does.
- A free tier that is genuinely usable — 100 requests/day, no credit card — which covers demos, hackathons, and small side projects. The paid plan is $8/month for 10,000 requests/day.
- Plain REST + JSON, with official Python, JavaScript/TypeScript, and Go clients that use nothing outside their standard libraries.
Five lines of Python
import justrouting
client = justrouting.Client("YOUR_API_KEY")
route = client.routes.get(justrouting.RouteRequest(
origin=[106.8146, -6.1352], # Jakarta Kota
destination=[107.6191, -6.9175], # Bandung
))
print(f"{route.distance / 1000:.1f} km, {route.duration / 60:.0f} min")
Swap the profile to motorcycle and you get the two-wheeler route instead:
route = client.routes.get(justrouting.RouteRequest(
origin=[106.8146, -6.1352],
destination=[107.6191, -6.9175],
profile="motorcycle",
))
Distance matrices are equally compact, and the API is smart about cost: request only the rows you need with sources=[0] and pay for the depot's row rather than the full N×N square.
m = client.matrix.get(justrouting.MatrixRequest(
coordinates=[depot, stop_a, stop_b],
sources=[0],
destinations=[1, 2],
))
And when one vehicle is not enough, the same client speaks VROOM: assign jobs to a fleet and get back an ordered route for every vehicle.
plan = client.optimization.solve(justrouting.OptimizationRequest(
vehicles=[justrouting.Vehicle(id=1, start=[106.8146, -6.1352],
end=[106.8146, -6.1352])],
jobs=[justrouting.Job(id=101, location=[106.8451, -6.2146]),
justrouting.Job(id=102, location=[106.8460, -6.2132])],
))
for step in plan.routes[0].steps:
print(step) # each step: a job, or the vehicle's start/end
The same call from Node
import { Client } from '@justrouting/client';
const client = new Client('YOUR_API_KEY');
const route = await client.routes.get({
origin: [106.8146, -6.1352],
destination: [107.6191, -6.9175],
});
console.log(`${(route.distance / 1000).toFixed(1)} km`);
Both clients are stdlib-only and dependency-free, which keeps your supply chain boring — in the good way.
Where it gets interesting: your AI agent can route too
JustRouting ships an official MCP server, so MCP-compatible assistants (Claude, Cursor, and others) can compute routes and geocode places directly instead of guessing coordinates.
Install it in one line:
curl -fsSL https://raw.githubusercontent.com/justrouting/mcp/main/install.sh | sh
Then add it to your client config:
{
"mcpServers": {
"justrouting": {
"command": "justrouting-mcp",
"env": { "JUSTROUTING_API_KEY": "YOUR_API_KEY" }
}
}
}
The server exposes four tools — route, geocode, table, and optimize. In practice that means you can ask the agent "which of my five drivers in Jakarta is closest to the customer at the mall?" and it geocodes the address, builds a matrix from the five driver positions, and answers in driving minutes — no glue code, no copy-pasting coordinates. The server is listed in the official MCP Registry and installable in Claude Desktop as a one-click extension bundle.
Try it before you commit
The interactive demo lets you fire route, matrix, and optimization requests from the browser, and the docs cover every endpoint with curl examples. A free API key takes about thirty seconds.
To be clear about the trade-off: if you need global coverage, fully offline operation, or total control over the graph, self-hosting OSRM is still the right call. JustRouting is deliberately regional — Southeast Asia, with motorcycle profiles and local road data — and that focus is exactly what keeps it small, cheap, and fast.
The pitch is simple: keep the open-source engines, drop the server farm. If your route graph lives in Southeast Asia, that trade is easy to make.
Top comments (0)