Prompt

How do I estimate ETAs for last-mile deliveries using a maps API?

Technology / API Platforms2 observationsLast seen Nov 20, 2026

Latest observation

Nov 20, 2026OpenAI APIWeb search: off

To estimate ETAs for last-mile deliveries with a maps API, the usual approach is:

1) Get route travel time from the maps API

Most maps/routing APIs provide:

  • Distance
  • Driving time
  • Traffic-adjusted ETA if supported

Typical flow:

  1. Take the delivery stop’s latitude/longitude.
  2. Call a routing/directions API from the driver’s current location or last stop.
  3. Use the returned travel time as the base ETA.

Common APIs:

  • Google Maps Routes/Directions API
  • Mapbox Directions API
  • HERE Routing API
  • Bing Maps
  • OSRM / OpenRouteService

2) Use the right origin

For last-mile deliveries, the ETA should usually be based on:

  • Driver’s current GPS location, not just warehouse location
  • Or previous stop if you’re sequencing multiple drops

If you’re doing multi-stop routes, calculate ETAs sequentially:

  • ETA(stop 1) = now + travel time from current position
  • ETA(stop 2) = ETA(stop 1) + service time at stop 1 + travel time to stop 2
  • and so on

3) Add stop/service time

Maps APIs usually estimate only travel time, not time spent:

  • parking
  • walking to the door
  • handoff/signature
  • apartment access delays

So add a service buffer per stop, for example:

  • Residential house: 2–5 min
  • Apartment/commercial: 5–10+ min

4) Account for traffic and time of day

If your API supports it, request:

  • departure_time=now
  • traffic_model or equivalent
  • historical traffic or live traffic

This makes ETAs much more realistic, especially in cities.

5) Recompute dynamically

Last-mile ETAs drift as conditions change. Recalculate:

  • when the driver moves significantly
  • after each completed stop
  • every few minutes during active delivery
  • when route deviation is detected

6) Improve accuracy with correction factors

Raw map ETAs are often optimistic. You can calibrate them using your own historical data:

  • Compare predicted ETA vs actual arrival time
  • Learn correction factors by:
    • city/zone
    • time of day
    • weekday/weekend
    • vehicle type
    • stop type
    • traffic level

A simple version:

  • ETA = maps_travel_time * factor + service_time
  • Example factor: 1.10–1.30 depending on your network

7) Handle multi-stop optimization separately

If you need route ordering as well as ETAs:

  • Use a route optimization API or solve a VRP/TSP problem
  • Then pass the ordered stops to the routing API for travel-time ETAs

8) Basic ETA formula

A practical starting point:

ETA_next_stop = current_time
              + maps_travel_time(origin, destination, traffic=true)
              + service_time_estimate
              + buffer

For a route of multiple stops:

ETA_stop[i] = ETA_stop[i-1]
            + service_time_stop[i-1]
            + maps_travel_time(stop[i-1], stop[i])

9) Example implementation idea

Pseudo-code:

origin = driver_location
eta = now

for stop in delivery_stops:
    travel = maps_api.get_travel_time(origin, stop.location, traffic=True)
    service = estimate_service_time(stop)
    eta = eta + travel + service
    stop.eta = eta
    origin = stop.location

10) Watch out for common pitfalls

  • Using warehouse departure time instead of live driver location
  • Ignoring traffic
  • Ignoring service time
  • Not recalculating after delays
  • Assuming map ETA = delivery ETA
  • Not smoothing noisy GPS updates

If you want, I can also show:

  • a Google Maps API example
  • a Mapbox/HERE example
  • or a full ETA model for multi-stop delivery routing.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (2 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.