canonical: https://jentic.com/apis/mapquest.com/mapquest

# MapQuest API

MapQuest provides a suite of mapping services covering geocoding, reverse geocoding, batch geocoding, turn-by-turn directions, optimised multi-stop routing, alternate routes, route matrices, static map images, and predictive place search. The API exposes 15 endpoints across the /geocoding, /directions, /staticmap, and /search namespaces and authenticates with a single API key passed in the URL query string. It is positioned for logistics, delivery dispatch, in-product address lookups, and embedded route planning in web and mobile clients.

## For AI agents

Calculate driving routes, optimise multi-stop deliveries, geocode addresses, and render static map images via 15 MapQuest endpoints. Authentication is a single API key supplied in the query string.

## Scope

Does not handle live traffic incident feeds, indoor mapping, or vector tile rendering - use for routing, geocoding, place search, and static map images only.

## Capabilities

- Calculate a driving route with `/directions/v2/route` and return a step-by-step turn list with distances
- Solve multi-stop ordering through `/directions/v2/optimizedroute` for delivery and field-service runs
- Generate alternate routes with `/directions/v2/alternateroutes` when the primary route is blocked
- Build a travel-time matrix between many origins and destinations via `/directions/v2/routematrix`
- Geocode addresses one-at-a-time or in batches with `/geocoding/v1/address` and `/geocoding/v1/batch`
- Render a centred PNG map for any coordinate or route shape using `/staticmap/v5/map`
- Power autocomplete with `/search/v3/prediction` and resolve picks with `/search/v4/place`

## Use cases

### Field-Service Dispatch Routing

Field-service operations call `/directions/v2/optimizedroute` and `/directions/v2/routematrix` to assign technicians to jobs and sequence visits across a working day. The matrix endpoint pre-computes pairwise drive times between technicians and job sites and the optimised route endpoint returns the best stop ordering. Initial integration takes a couple of days for a fully automated dispatcher.

Example prompt: POST a routematrix request with 4 technician start locations and 12 job sites, then call `/directions/v2/optimizedroute` for the assigned technician with the best 6 jobs.

### Last-Mile Delivery ETAs

Last-mile delivery products call `/directions/v2/route` to compute live ETAs for each stop after every successful drop and surface them in the customer-facing tracking page. The endpoint accepts driving, walking, or trucking modes and returns leg-by-leg time and distance. Wiring up the endpoint behind a tracking webhook is typically a half-day's work.

Example prompt: Call `/directions/v2/route` with the driver's current GPS position and the next stop address and return the estimated arrival time in minutes.

### Static Route Maps in Receipts

Ride-share and courier products embed a `/staticmap/v5/map` image of the route polyline in receipt emails and printable trip summaries. Because the endpoint returns a PNG it works inside any HTML email client without a map runtime. The route shape comes from `/directions/v2/routeshape` so the static image accurately reflects the chosen path.

Example prompt: Call `/directions/v2/routeshape` for trip ID 12345, then call `/staticmap/v5/map` with the returned shape and return a 600x300 PNG URL.

### Address Autocomplete in Booking Flows

Travel and ride-booking products call `/search/v3/prediction` for type-ahead suggestions and `/search/v4/place` to resolve the chosen suggestion to a structured place with coordinates. The combination replaces a static address form with a low-friction search box and is wired in through a debounced front-end input handler.

Example prompt: Query `/search/v3/prediction` with the user's partial input 'logan int' and return the top three airport-category suggestions with their place IDs.

### AI Agent Routing Tool

An AI travel planner or logistics assistant calls MapQuest through Jentic to compute routes, optimise stop orders, and generate map images for chat replies. Jentic exposes each MapQuest operation as a typed tool with a discoverable input schema so the agent invokes the right endpoint without browsing developer docs. Setup runs through search, load, and execute in under an hour.

Example prompt: Search Jentic for 'calculate a driving route with MapQuest', load the schema for `/directions/v2/route`, and execute a Boston-to-New York call returning total distance and time.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/directions/v2/route` | Calculate a driving route between points |
| GET | `/directions/v2/optimizedroute` | Solve optimal multi-stop ordering |
| GET | `/directions/v2/alternateroutes` | Return alternate routes |
| POST | `/directions/v2/routematrix` | Build a travel-time matrix |
| GET | `/geocoding/v1/address` | Geocode a single address |
| POST | `/geocoding/v1/batch` | Batch-geocode many addresses |
| GET | `/staticmap/v5/map` | Render a PNG static map |
| GET | `/search/v4/place` | Look up place details |

## Key resources

- **Directions** — Routing, optimised multi-stop, alternates, matrix, and route shape endpoints under `/directions/v2`
- **Geocoding** — Forward, reverse, and batch geocoding under `/geocoding/v1`
- **Static Map** — Server-rendered PNG maps via `/staticmap/v5/map`
- **Search** — Place prediction and place detail endpoints under /search

## Why Jentic

- **Setup:** Wiring MapQuest by hand means appending its key query parameter, learning the separate /directions, /geocoding, /staticmap, and /search paths, and handling batch requests yourself. Through Jentic you install once, import the MapQuest API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The MapQuest target travels in query parameters rather than the URL path, so scoping is by operation: you limit the agent to the operations it needs, such as calculating a route, geocoding an address, or fetching a static map, and leave out the rest. Every operation you allow is one you have chosen, so the agent stays inside that set.
- **Credential handling:** Your MapQuest key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'calculate a driving route' or 'optimise a multi-stop delivery', and Jentic returns the matching MapQuest operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **TomTom Routing API** — TomTom Routing focuses on traffic-aware routing and ETAs; MapQuest covers routing, geocoding, place search, and static maps in one API.
- **HERE Maps** — HERE offers a deeper enterprise mapping platform; MapQuest is lighter weight and quicker to wire in for routing and geocoding.
- **Geocodio** — Geocodio provides high-volume US/Canada geocoding that pairs well with MapQuest's routing and static map endpoints.
- **OpenCage Geocoding API** — OpenCage's OpenStreetMap-based geocoder is a useful fallback or cross-check for MapQuest's geocoder.

## FAQ

### What authentication does the MapQuest API use?

The MapQuest API uses an API key passed as the `key` query string parameter on every request. Jentic stores the key encrypted in your Jentic One instance and injects it at execution time so the raw key never enters the agent context.

### Can I calculate optimised multi-stop routes with the MapQuest API?

Yes. The `/directions/v2/optimizedroute` endpoint accepts a list of waypoints and returns them in the optimal driving sequence with per-leg distance and time. For pre-computing many-to-many drive times use `/directions/v2/routematrix.`

### What are the rate limits for the MapQuest API?

Quotas are enforced at the account level rather than per-second and depend on the plan selected on developer.mapquest.com. The API returns HTTP 403 when the monthly transaction allowance is exhausted; check the account dashboard for current usage.

### How do I calculate a route between two cities through Jentic?

Run `pip install jentic`, search for 'calculate a driving route with MapQuest', load the schema for GET `/directions/v2/route`, and execute it with the `from` and `to` parameters set to the city names. Jentic handles the API key and returns parsed JSON.

### Can the MapQuest API return alternate routes?

Yes. The GET `/directions/v2/alternateroutes` endpoint returns up to two alternate paths between an origin and destination alongside the primary route, which is useful when the main path is congested or blocked.

### Does the MapQuest API support batch geocoding?

Yes. POST `/geocoding/v1/batch` accepts an array of addresses in a single request and returns a coordinate result for each one, which is faster and cheaper than calling `/geocoding/v1/address` in a loop.

### Can I limit what my agent is allowed to do with the MapQuest API?

Yes. Because you run Jentic One yourself, your own rules decide which MapQuest operations the agent can call and which credentials it may use. Since MapQuest scopes by operation rather than URL path, you allow only the endpoints the agent needs, such as GET `/directions/v2/route` for routing, `/geocoding/v1/address` for geocoding, or `/staticmap/v5/map` for a static image, and leave the rest out. Every operation the agent can reach is one you have explicitly permitted, and your API key is injected at execution time so it never enters the agent's context.
