All posts

Car Routing Is Here: `vehicle=car` on the Directions API

The Directions API now routes cars on their own dedicated road graph — not a relabeled motorbike route — for ride-hailing, delivery vans and logistics fleets that drive cars in Vietnam.

When we shipped the Directions API, we built it motorbike-first — that's how most of Vietnam actually moves. But plenty of apps need the other side of the road too: ride-hailing, delivery vans, logistics fleets. Today GET /v1/directions adds a second vehicle profile: vehicle=car.

Not just a relabeled motorbike route

Car and motorbike routing aren't the same problem. Motorbikes cut through narrow alleys and lanes a car can't fit into; cars need to respect one-way restrictions, avoid ways that are too narrow, and generally stick to the road network a real car can actually drive. So vehicle=car isn't the motorbike profile with a different label — it runs on its own dedicated road graph, built and tuned specifically for car traversal. The route, the ETA, and the turn-by-turn instructions all reflect how a car would actually get there.

Same request, same response shape

Nothing else about the API changes. Same endpoint, same Google Directions–compatible response shape — just flip the vehicle param.

Request

curl -G "https://api.gogoduk.com/v1/directions" \
  -H "X-API-Key: $GOGODUK_API_KEY" \
  --data-urlencode "origin=21.0285,105.8542" \
  --data-urlencode "destination=21.2212,105.8072" \
  --data-urlencode "vehicle=car"
  • origin / destinationlat,lng (same order Google/Goong use).
  • vehiclemotobike (default) or car.
  • Scope required: routing:read.

Response

{
  "status": "OK",
  "routes": [
    {
      "legs": [
        {
          "distance": { "text": "5.7 km", "value": 5704.1 },
          "duration": { "text": "9 phút", "value": 511.2 },
          "steps": [
            {
              "distance": { "text": "243 m", "value": 243.4 },
              "html_instructions": "Head northwest on Pasteur",
              "maneuver": "turn-right",
              "polyline": { "points": "suw`Aq{fjSOF{Bx@..." },
              "travel_mode": "DRIVING"
            }
          ]
        }
      ],
      "overview_polyline": { "points": "suw`Aq{fjS..." }
    }
  ]
}

The same fallback behavior applies as before: if no road route exists between the two points, you still get a straight-line estimate with status: "ESTIMATED" instead of an error, so your map always has something to draw.

Try it

Questions or feedback? Join our Telegram support group — we'd love to hear what you build.

Want to use GoGoDuk?

Free forever — 100 requests/day per account, no credit card. Higher limits on request.

Sign up →