> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Amap (Gaode) Web Service

> China maps from Amap/Gaode: geocoding and reverse geocoding, POI search by keyword, area or id, driving and transit routes, and city weather.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/amap.webp?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=d651f390500831e01598ff15851a0670)

[Web Catalog · Maps](https://docs.webrouter.net/data-apis.md?category=maps)

Needs&#x20;

`AMAP_API_KEY`

Endpoints

8

Auth

Key in query

[Vendor docs](https://lbs.amap.com/api/webservice/summary)

## Setup

| Variable | | What it is |
| - | - | - |
| `AMAP_API_KEY` | required | An Amap Web Service key (Web服务 type), created in the Amap developer console (lbs.amap.com). Sent as the key query parameter. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) 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

GET

Geocode an address

Coordinates, adcode and administrative levels for a structured Chinese address.

[Open](#amap-geocode)

GET

Reverse-geocode a coordinate

The address at a point, and with extensions=all the nearby POIs, roads and intersections.

[Open](#amap-reverse-geocode)

GET

Search places by keyword

POIs matching a keyword or POI type codes, optionally boosted to or limited to a region (POI search 2.0).

[Open](#amap-places-search)

GET

Search places around a point

POIs within a radius of a coordinate, by keyword or type, sorted by distance or weight.

[Open](#amap-places-around)

GET

Get places by id

Full records for up to 10 POI ids.

[Open](#amap-places-detail)

GET

Plan a driving route

Driving routes between two coordinates, with optional waypoints, avoid areas and strategy (route planning 2.0).

[Open](#amap-directions-driving)

GET

Plan a public-transit route

Bus and subway itineraries between two coordinates within or across cities.

[Open](#amap-directions-transit)

GET

Get a city's weather

Live conditions, or the forecast with extensions=all, for a Chinese city by adcode.

[Open](#amap-weather)

### Geocode an address

GET

`/v3/geocode/geo`

`amap.geocode`

Coordinates, adcode and administrative levels for a structured Chinese address.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `address`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Structured address, largest area first (province, city, district, street, number).
      </td>
    </tr>

    <tr>
      <td>
        `city`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        City to search in: Chinese name, pinyin, citycode or adcode. Nationwide when unset.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://lbs.amap.com/api/webservice/guide/api/georegeo) · Same job: [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-geocode), [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-geocode-search), [Google Maps Platform](https://docs.webrouter.net/data-apis/google-maps.md#google-maps-geocode-forward), [GraphHopper Directions API](https://docs.webrouter.net/data-apis/graphhopper.md#graphhopper-geocode-forward), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-geocode), [OpenCage Geocoding](https://docs.webrouter.net/data-apis/opencage.md#opencage-geocode-forward)

### Reverse-geocode a coordinate

GET

`/v3/geocode/regeo`

`amap.reverse_geocode`

The address at a point, and with extensions=all the nearby POIs, roads and intersections.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `location`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        'longitude,latitude', at most 6 decimals.
      </td>
    </tr>

    <tr>
      <td>
        `radius`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Search radius in metres, 0 to 3000, default 1000.
      </td>
    </tr>

    <tr><td>`extensions`</td><td>string</td><td>query</td><td>base (default) returns the address only; all adds nearby POIs, roads and intersections. One of `base`, `all`</td></tr>

    <tr>
      <td>
        `poitype`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        POI type codes separated by '|'; only with extensions=all.
      </td>
    </tr>

    <tr><td>`roadlevel`</td><td>integer</td><td>query</td><td>0 all roads, 1 main roads only; only with extensions=all. One of `0`, `1`</td></tr>
    <tr><td>`homeorcorp`</td><td>integer</td><td>query</td><td>POI ordering with extensions=all: 0 unchanged, 1 home-related first, 2 work-related first. One of `0`, `1`, `2`</td></tr>
  </tbody>
</table>

[Vendor docs](https://lbs.amap.com/api/webservice/guide/api/georegeo) · Same job: [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-reverse-geocode)

### Search places by keyword

GET

`/v5/place/text`

`amap.places.search`

POIs matching a keyword or POI type codes, optionally boosted to or limited to a region (POI search 2.0).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `keywords`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        One keyword or address, at most 80 characters. Required unless types is set.
      </td>
    </tr>

    <tr>
      <td>
        `types`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        POI type codes separated by '|'. Required unless keywords is set.
      </td>
    </tr>

    <tr>
      <td>
        `region`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        citycode, adcode or city-level Chinese name to boost results in. Nationwide when unset.
      </td>
    </tr>

    <tr>
      <td>
        `city_limit`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        true to return only results inside region. Default false.
      </td>
    </tr>

    <tr><td>`langCode`</td><td>string</td><td>query</td><td>Result language, default zh. One of `zh`, `en`</td></tr>

    <tr>
      <td>
        `show_fields`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated optional response fields; only basic fields when unset.
      </td>
    </tr>

    <tr>
      <td>
        `page_size`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        1 to 25, default 10.
      </td>
    </tr>

    <tr>
      <td>
        `page_num`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page number, default 1.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://lbs.amap.com/api/webservice/guide/api-advanced/newpoisearch) · Same job: [Atly](https://docs.webrouter.net/data-apis/atly.md#atly-places-search), [Best Buy](https://docs.webrouter.net/data-apis/bestbuy.md#bestbuy-stores-search), [FDIC BankFind Suite](https://docs.webrouter.net/data-apis/fdic.md#fdic-locations-search), [Foursquare Places API](https://docs.webrouter.net/data-apis/foursquare.md#foursquare-places-search), [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-places-search), [Google Maps Platform](https://docs.webrouter.net/data-apis/google-maps.md#google-maps-places-text-search)

```python Python theme={null}
router.call_data_api("amap.places.search")
```

```text MCP theme={null}
call_data_api(endpoint="amap.places.search")
```

### Search places around a point

GET

`/v5/place/around`

`amap.places.around`

POIs within a radius of a coordinate, by keyword or type, sorted by distance or weight.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `location`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Centre as 'longitude,latitude', at most 6 decimals.
      </td>
    </tr>

    <tr>
      <td>
        `keywords`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        One keyword, at most 80 characters.
      </td>
    </tr>

    <tr>
      <td>
        `types`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        POI type codes separated by '|'. With neither keywords nor types, defaults to dining, lifestyle services and business residences.
      </td>
    </tr>

    <tr>
      <td>
        `radius`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Metres, 0 to 50000, default 5000.
      </td>
    </tr>

    <tr><td>`sortrule`</td><td>string</td><td>query</td><td>Default distance; distance has no effect when only keywords is given. One of `distance`, `weight`</td></tr>

    <tr>
      <td>
        `region`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Administrative name, citycode or adcode to boost results in.
      </td>
    </tr>

    <tr>
      <td>
        `city_limit`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        true to return only results inside region.
      </td>
    </tr>

    <tr>
      <td>
        `langCode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        &#x20;One of&#x20;

        `zh`

        ,&#x20;

        `en`
      </td>
    </tr>

    <tr>
      <td>
        `show_fields`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated optional response fields.
      </td>
    </tr>

    <tr>
      <td>
        `page_size`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        1 to 25, default 10.
      </td>
    </tr>

    <tr>
      <td>
        `page_num`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page number, default 1.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://lbs.amap.com/api/webservice/guide/api-advanced/newpoisearch) · Same job: [Atly](https://docs.webrouter.net/data-apis/atly.md#atly-places-search), [Best Buy](https://docs.webrouter.net/data-apis/bestbuy.md#bestbuy-stores-search), [FDIC BankFind Suite](https://docs.webrouter.net/data-apis/fdic.md#fdic-locations-search), [Foursquare Places API](https://docs.webrouter.net/data-apis/foursquare.md#foursquare-places-search), [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-places-search), [Google Maps Platform](https://docs.webrouter.net/data-apis/google-maps.md#google-maps-places-text-search)

### Get places by id

GET

`/v5/place/detail`

`amap.places.detail`

Full records for up to 10 POI ids.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        POI ids separated by '|', at most 10.
      </td>
    </tr>

    <tr>
      <td>
        `show_fields`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated optional response fields.
      </td>
    </tr>

    <tr>
      <td>
        `langCode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        &#x20;One of&#x20;

        `zh`

        ,&#x20;

        `en`
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://lbs.amap.com/api/webservice/guide/api-advanced/newpoisearch) · Same job: [Litescrape](https://docs.webrouter.net/data-apis/litescrape.md#litescrape-tripadvisor-place), [Recreation.gov RIDB](https://docs.webrouter.net/data-apis/ridb.md#ridb-recareas-get), [VOYGR](https://docs.webrouter.net/data-apis/voygr.md#voygr-enrich)

### Plan a driving route

GET

`/v5/direction/driving`

`amap.directions.driving`

Driving routes between two coordinates, with optional waypoints, avoid areas and strategy (route planning 2.0).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `origin`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Start as 'longitude,latitude'.
      </td>
    </tr>

    <tr>
      <td>
        `destination`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        End as 'longitude,latitude'.
      </td>
    </tr>

    <tr>
      <td>
        `origin_id`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Origin POI id, for accuracy.
      </td>
    </tr>

    <tr>
      <td>
        `destination_id`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Destination POI id, for accuracy.
      </td>
    </tr>

    <tr>
      <td>
        `destination_type`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        POI category of the destination.
      </td>
    </tr>

    <tr>
      <td>
        `strategy`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Route strategy code 0 to 45; default 32 (Amap's default).
      </td>
    </tr>

    <tr>
      <td>
        `waypoints`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Up to 16 ordered via-points separated by ';'.
      </td>
    </tr>

    <tr>
      <td>
        `avoidpolygons`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Up to 32 areas separated by '|', each at most 16 vertices and 81 km².
      </td>
    </tr>

    <tr>
      <td>
        `plate`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Licence plate, to respect traffic restrictions.
      </td>
    </tr>

    <tr><td>`cartype`</td><td>integer</td><td>query</td><td>0 petrol (default), 1 electric, 2 plug-in hybrid. One of `0`, `1`, `2`</td></tr>
    <tr><td>`ferry`</td><td>integer</td><td>query</td><td>0 use ferries (default), 1 avoid them. One of `0`, `1`</td></tr>

    <tr>
      <td>
        `show_fields`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Optional response fields; basic fields only when unset.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://lbs.amap.com/api/webservice/guide/api/newroute) · Same job: [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-routing), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-routes), [Mapbox](https://docs.webrouter.net/data-apis/mapbox.md#mapbox-directions-get), [TomTom](https://docs.webrouter.net/data-apis/tomtom.md#tomtom-routing-calculate)

### Plan a public-transit route

GET

`/v5/direction/transit/integrated`

`amap.directions.transit`

Bus and subway itineraries between two coordinates within or across cities.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `origin`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Start as 'longitude,latitude'.
      </td>
    </tr>

    <tr>
      <td>
        `destination`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        End as 'longitude,latitude'.
      </td>
    </tr>

    <tr>
      <td>
        `city1`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Origin citycode.
      </td>
    </tr>

    <tr>
      <td>
        `city2`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Destination citycode; the same as city1 for a same-city trip.
      </td>
    </tr>

    <tr>
      <td>
        `originpoi`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Origin POI id; send with destinationpoi.
      </td>
    </tr>

    <tr>
      <td>
        `destinationpoi`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Destination POI id; send with originpoi.
      </td>
    </tr>

    <tr>
      <td>
        `ad1`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Origin district adcode.
      </td>
    </tr>

    <tr>
      <td>
        `ad2`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Destination district adcode.
      </td>
    </tr>

    <tr>
      <td>
        `strategy`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        0 (recommended, default) to 8 (shortest time); includes cheapest and fewest transfers.
      </td>
    </tr>

    <tr>
      <td>
        `AlternativeRoute`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Routes to return, 1 to 10, default 5.
      </td>
    </tr>

    <tr><td>`nightflag`</td><td>integer</td><td>query</td><td>1 to consider night buses. Default 0. One of `0`, `1`</td></tr>

    <tr>
      <td>
        `date`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Travel date, e.g. 2013-10-28.
      </td>
    </tr>

    <tr>
      <td>
        `time`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Travel time, e.g. 9-54.
      </td>
    </tr>

    <tr>
      <td>
        `show_fields`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Optional response fields.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://lbs.amap.com/api/webservice/guide/api/newroute) · Same job: [Geoapify](https://docs.webrouter.net/data-apis/geoapify.md#geoapify-routing), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-routes), [Mapbox](https://docs.webrouter.net/data-apis/mapbox.md#mapbox-directions-get), [TomTom](https://docs.webrouter.net/data-apis/tomtom.md#tomtom-routing-calculate)

### Get a city's weather

GET

`/v3/weather/weatherInfo`

`amap.weather`

Live conditions, or the forecast with extensions=all, for a Chinese city by adcode.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `city`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        The city's adcode (from geocode).
      </td>
    </tr>

    <tr><td>`extensions`</td><td>string</td><td>query</td><td>base returns live conditions, all the forecast. One of `base`, `all`</td></tr>
  </tbody>
</table>

[Vendor docs](https://lbs.amap.com/api/webservice/guide/api/weatherinfo) · Same job: [FlightAware AeroAPI](https://docs.webrouter.net/data-apis/flightaware.md#flightaware-airports-weather), [US National Weather Service](https://docs.webrouter.net/data-apis/nws.md#nws-observations-latest), [OpenWeather](https://docs.webrouter.net/data-apis/openweather.md#openweather-weather-current), [Tomorrow.io](https://docs.webrouter.net/data-apis/tomorrow-io.md#tomorrow-io-weather-realtime), [WeatherAPI.com](https://docs.webrouter.net/data-apis/weatherapi.md#weatherapi-current)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.