drive_time
Calculate car driving distance and travel time between two places in Denmark. Optionally get the time you must leave to arrive by a specific time, including a buffer.
Instructions
Compute car driving distance and typical travel time between two places in Denmark using OpenStreetMap data. Both 'from' and 'to' accept a Danish place name / address (e.g. 'Horsens', 'Billund Lufthavn', 'Rådhuspladsen, København') or a coordinate string in 'lat,lon' format. Returns distanceKm, durationMin, and the resolved place names. If 'arriveBy' is given (ISO datetime such as '2026-06-12T12:00' or 'HH:MM' for today in Copenhagen time), also returns leaveByLocal — the time you must leave to arrive on time including a buffer (default 10 min from DEFAULT_BUFFER_MIN). IMPORTANT: Duration is free-flow routing time WITHOUT live traffic. Allow extra time during rush hours.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Origin place name, address, or "lat,lon". Required when DEFAULT_ORIGIN env is not set. | |
| to | Yes | Destination place name, address, or "lat,lon". Required. | |
| arriveBy | No | Desired arrival time. ISO datetime ("2026-06-12T12:00") or "HH:MM" (today in Europe/Copenhagen). When provided, leaveByLocal is calculated: arriveBy − durationMin − bufferMin. | |
| bufferMin | No | Extra buffer minutes subtracted when computing leaveByLocal (default 10 from DEFAULT_BUFFER_MIN). |