Plan a trip from A to B through charging stops

Draws the road route, picks charging stops from the sites listed here, and says how long each stop takes. The car never arrives anywhere below the reserve the driver sets, including at the destination: a trip that cannot be made that way comes back as the stretch of road where it fails, never as a plan that breaks the reserve.

Australia and New Zealand for now. The router holds OpenStreetMap data for those two countries, so a trip elsewhere has no road route.

Coordinates are rounded to three decimal places, about 100 m, before anything is planned: a plan depends only on its inputs and the data, so it can be cached, and no exact position reaches a log or a cache key.

Times are estimates from a charging curve, not a promise: a charger may be busy, cold or broken when you arrive. Every stop carries its site's page, where the state of the record is written out.

get/v1/trips/plan

Request

  • Base URL: https://api.chargealong.io
  • URL: https://api.chargealong.io/v1/trips/plan
  • Auth: none required

Query parameters

fromstring required

Where the trip starts, as latitude,longitude

tostring required

Where the trip ends, as latitude,longitude. Somewhere other than from.

range_kmnumber required

How far the car goes on a full battery, in kilometres. The real figure, which is usually below the rated one.

reservenumber

Never arrive anywhere below this percentage, including at the destination

startnumber

Battery percentage at the start. Must be above the reserve: at least reserve + 1.

charge_tonumber

Never charge above this percentage. At least 50, and at least reserve + 10. Above 80 a DC charger slows sharply, so stopping more often is usually faster.

battery_kwhnumber

Usable battery in kWh. Only charging times need it, and it defaults to range_km multiplied by 0.17.

max_dc_kwnumber

The most DC power the car accepts

max_ac_kwnumber

The most AC power the car accepts

min_kwnumber

Ignore chargers slower than this. A slow charger is not a stop on a long trip.

connectorsstring

The connectors the car takes, comma separated. CCS2 and Type 2 in Australia and New Zealand.

Response

The route line, the stops in order with the charge in and out of each, and the totals. A trip that cannot meet the reserve answers here too, with feasible false and the gap named.

next_cursorstring

Present only on a paged list: pass it back to read the next page. No public read is paged today.

generated_atstring date-time required

When this answer was generated, UTC. Answers are cached, so it can be up to an hour old.

Changes

No recorded changes to this operation across all 1 revision of this API.