High-performance offline routing powered by BRouter. Drop-in replacement for OSRM with bike-optimized routing, elevation awareness, and bridge/tunnel detection.
OSRM-compatible routing API optimized for cycling with elevation awareness and structure detection.
BRouter's trekking profile considers bike-friendly roads, cycle paths, surface quality, and traffic.
Routes consider elevation changes, preferring flatter paths when appropriate for cycling.
Returns bridge and tunnel locations along the route for better ride analysis.
Drop-in replacement for OSRM. Same endpoint format, same response structure.
Full OpenStreetMap data coverage for routing anywhere in the world.
All routing is done locally - no per-request charges from external services.
Check API health and BRouter server status. No authentication required.
curl https://bikerouter.enduranceplayground.com/status
Response:
{
"status": "healthy",
"service": "brouter-api",
"version": "1.0.0",
"brouter": "connected",
"database": "connected"
}
Calculate a route between waypoints. Returns OSRM-compatible response with geometry, distance, and duration.
curl "https://bikerouter.enduranceplayground.com/route/v1/cycling/-96.571,32.855;-96.580,32.860?api_key=YOUR_KEY&geometries=geojson&overview=full"
Response:
{
"code": "Ok",
"waypoints": [
{"name": "", "location": [-96.571, 32.855], "distance": 0},
{"name": "", "location": [-96.580, 32.860], "distance": 0}
],
"routes": [{
"distance": 1523.5,
"duration": 340,
"geometry": {
"type": "LineString",
"coordinates": [[-96.571, 32.855], [-96.572, 32.856], ...]
},
"structures": [
{"type": "bridge", "value": "yes", "location": [-96.575, 32.857], "surface": "concrete", "lit": "yes"}
],
"legs": [...]
}]
}
| Parameter | Values | Description |
|---|---|---|
geometries | geojson, polyline, polyline6 | Response geometry format |
overview | full, simplified, false | Level of geometry detail |
api_key | string | Your API key (required) |
Snap a coordinate to the nearest road. Uses PostGIS spatial queries against 137M+ roads.
curl "https://bikerouter.enduranceplayground.com/nearest/v1/cycling/-96.571,32.855?api_key=YOUR_KEY&number=3"
Response:
{
"code": "Ok",
"waypoints": [
{"name": "Main Street", "location": [-96.5712, 32.8551], "distance": 12.5},
{"name": "", "location": [-96.5708, 32.8549], "distance": 25.3},
{"name": "Oak Avenue", "location": [-96.5715, 32.8553], "distance": 38.1}
]
}
| OSRM Profile | BRouter Profile | Best For |
|---|---|---|
cycling, bike, bicycle |
trekking | General bike routing, balanced for safety and speed |
driving, car |
car-fast | Fallback for car routes |
foot, walking, pedestrian |
hiking-mountain | Fallback for walking routes |
Routes include a structures array with bridge and tunnel locations and metadata extracted from OpenStreetMap data.
| Field | Description | Example Values |
|---|---|---|
type | Structure type (always present) | bridge, tunnel |
value | OSM tag value (always present) | yes, viaduct, movable, cantilever, covered, building_passage, culvert |
location | Coordinates [lng, lat] (always present) | [-96.575, 32.857] |
surface | Deck/road surface material | asphalt, concrete, wood, metal, paved |
smoothness | Surface quality for cycling | excellent, good, intermediate, bad |
lit | Whether structure is illuminated | yes, no |
layer | Vertical layer position | 1, 2, -1 |
covered | Whether structure is covered | yes, no |
maxweight | Weight restriction (tons) | 3.5, 7.5 |
maxheight | Height clearance (meters) | 2.5, 4.0 |
Optional fields are only included when available in OpenStreetMap data.