# A route through a clean-air zone says what it costs

A route that is 18 minutes quicker through central London is not cheaper if it costs £100 a day in zone charges. No routing engine knows that, because the charge is levied by an authority on the vehicle rather than carried by the road. So MapMap carries the 13 UK clean-air and low-emission zones itself, and every `POST /route` reply whose geometry crosses one gains a top-level `zones` block. No flag is needed, and a route that crosses none carries nothing new.

## What do I have to send to get a figure?

An `emissions` object, because whether a zone charges you depends on your vehicle's category and Euro standard, which a routing request has no other reason to carry.

```json
{
  "locations": [
    { "lat": 51.6562, "lon": -0.3903 },
    { "lat": 51.3762, "lon": -0.0982 }
  ],
  "costing": "truck",
  "emissions": {
    "vehicle_category": "van",
    "fuel": "diesel",
    "euro_standard": 5
  }
}
```

`vehicle_category` is one of `car`, `van`, `minibus`, `hgv`, `bus`, `coach`, `taxi`, `phv`, `motorcycle` or `motorhome`. `fuel` is `petrol`, `diesel`, `electric`, `hydrogen` or `gas`. `euro_standard` is 1 to 6, and a heavy-duty Euro VI vehicle is declared as `6`. It is required for any combustion fuel and optional for electric and hydrogen, which every scheme treats as compliant.

That Watford-to-Croydon run crosses both London schemes, and the reply says so, zone by zone:

```json
"zones": {
  "crossed": [
    {
      "id": "gb-london-ulez",
      "name": "London Ultra Low Emission Zone",
      "operator": "Transport for London",
      "type": "ulez",
      "enforcement": "charge",
      "assessment": "charged",
      "currency": "GBP",
      "entry_arc_m": 3500,
      "exit_arc_m": 37150,
      "distance_in_zone_m": 33650,
      "applicable_rule": { "min_euro": { "diesel": 6, "petrol": 4 }, "daily_charge": 12.5 },
      "source": { "publisher": "Transport for London", "checked": "2026-09-03" }
    },
    { "id": "gb-london-lez", "assessment": "compliant" }
  ],
  "estimated_charges": {
    "currency": "GBP", "daily_total": 12.5,
    "unresolved_zones": 0, "banned_zones": 0,
    "basis": "sum of each crossed zone's published daily charge for the declared vehicle, one charge per zone per day"
  }
}
```

A Euro 5 diesel van misses the ULEZ standard of Euro 6 diesel and is charged £12.50. It clears the LEZ standard for particulates and pays nothing there. Both zones are reported, because "no charge here" is an answer worth having. `entry_arc_m` and `exit_arc_m` are distances along the returned route, so they move with the road the engine picks. This reply was captured before we re-read every schedule on 16 November 2026: the rules in all 13 zones were unchanged, and only the `checked` date has moved on.

## What will you not do?

Four things, and each of them is a decision rather than an omission.

**We will not guess your vehicle.** Send no `emissions` object and every crossed zone comes back as `"assessment": "unknown"`, with the words *charge depends on vehicle emissions, supply `emissions` to resolve*. A wrong charge is worse than no charge, because it is a number somebody budgets against.

**We will not fold the charge into a cost.** `estimated_charges` is its own line and nothing in `trip.summary` changes. A road charge is not a routing cost, and a total that quietly contains both is a total nobody can reconcile.

**We will not call a ban a charge.** Scotland's four low-emission zones, in Glasgow, Edinburgh, Aberdeen and Dundee, do not charge. A non-compliant vehicle is prohibited and is issued a penalty charge notice; there is no daily fee that buys entry. Those zones report `"assessment": "banned"`, carry the penalty ladder in a `penalty` field, and add nothing to the money total.

**We will not quote a figure you cannot check.** Every entry carries the authority's own page, the publisher and the date a human last read it. `GET /v1/zones` serves the whole dataset with the same provenance, split between the charge schedule and the boundary geometry, so you can audit every number before you rely on one. Schedules change, and `checked` is a date rather than a promise.

## Can I route around a zone instead?

Sometimes, and the response is honest about when it cannot. Set `"avoid_zones": true` and the search is told to keep out of every zone this vehicle would be charged or banned in. It costs no extra engine call and no extra metering, because the decision is made from your own waypoints before the route is computed and applied with the engine's own `exclude_polygons`.

Two limits bite. The routing engine accepts at most 10 km of exclusion perimeter across a whole request, and most zone boundaries are larger than that. Of the 13 zones we carry, only five fit, and because the budget is shared, in practice one at a time. The London ULEZ boundary is 236 km around. A request that asks to avoid it gets this rather than a silent failure:

```json
"avoidance": {
  "requested": true,
  "excluded": [],
  "not_avoidable": [
    { "id": "gb-london-ulez", "reason": "exceeds_engine_exclusion_budget" }
  ]
}
```

Simplifying the ring does not help: simplification removes vertices, and the perimeter of a simplified ring is essentially the perimeter of the original. The zone is annotated in `crossed[]` instead, so the charge is still reported. A zone containing one of your own waypoints can never be avoided either, since excluding it would leave the request unroutable, and that comes back as `"reason": "waypoint_inside_zone"`.

## What this does not cover

**Avoid means exclude, for now.** There is no soft-cost mode. A chargeable zone is excluded exactly as a banned one is, so a route that would have been worth £12.50 is not offered at all. If you would happily pay to save 40 minutes, leave `avoid_zones` off, take the annotation, and decide from the figure.

**Exemptions, discounts and residency schemes are not modelled.** Neither is anything that turns on a weight the request does not state. Where a council charges a motor caravan £9 under 3.5 tonnes and £50 over it, the answer is `unknown` with the council's own wording, not a coin flip.

**Boundaries are simplified.** Each zone states the tolerance it was simplified to, and a route running within that distance of a boundary may be classified either way.

**`POST /optimise` says less, and says so.** The optimiser is fed a travel-time matrix rather than roads, so its `zones` block reports the zones the problem's own locations sit in and the avoidance applied to the matrix. Route each vehicle's ordered stops through `POST /route` for the per-route charges.

## Try it

Coverage today is 13 zones: the London ULEZ and LEZ, the seven English Clean Air Zones (Bath, Birmingham, Bradford, Bristol, Portsmouth, Sheffield and Tyneside), and the four Scottish LEZs. Pull the dataset and read the provenance for yourself:

```sh
curl -fsS "https://api.mapmap.ai/v1/zones?geometry=true" \
  -H "Authorization: Bearer $MAPMAP_API_KEY"
```

The request and response fields are in the [clean-air zones section of the truck and ADR guide](/docs/adr), the parameter table is in the [API reference](/docs/api-reference#clean-air-zones), and this is the same design we use for dangerous goods: the constraint belongs in costing and the caveat belongs in the response, as in [ADR tunnel compliance, enforced in costing](/news/adr-tunnel-compliance).
