Skip to main content

Setup

Put them in your environment or .env; Data APIs covers the other ways.

Notes

  • Coordinates are ‘longitude,latitude’ (longitude FIRST), at most 6 decimals, in Amap’s GCJ-02 system, not WGS-84.
  • Errors come back as HTTP 200 with status ‘0’ and an info/infocode; status ‘1’ means success.
  • A key with digital signatures (sig) switched on in the console needs a signed request, which this entry does not produce: use a key without signatures.
  • Docs and most response text are in Chinese; POI search 2.0 takes langCode=en for English results (an advanced service).
  • POI search pages stop at 200 records per parameter set, whatever page_num asks for.

Endpoints

Geocode an address

Reverse-geocode a coordinate

Search places around a point

Get places by id

Plan a driving route

Plan a public-transit route

Get a city’s weather