> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/getting-started/amap-geocode.md).

# Amap geocoding in China in Duaer

In Duaer: Amap: longitude, latitude, and adcode for a Chinese address. One successful search uses 1 credit.
## What you get

Duaer Amap geocoding in China turns a mainland China address into Amap coordinates and its administrative codes. Duaer holds the upstream API key; you only send your Duaer key.

Pick Duaer Data → Amap geocoding in China in the node creator, or open the [data market](/getting-started/data-market.md). Related: [Amap places in China](/getting-started/amap-poi.md), [Amap weather in China](/getting-started/amap-weather.md).

## When to use it

- Get coordinates for a delivery address in Beijing.
- Find the adcode of a district.

## When not to use it

- Places worldwide. Use [Place lookup](/getting-started/geocoding.md).
- Shops by keyword. Use [Amap places in China](/getting-started/amap-poi.md).

## Search on the canvas

1. Open the node creator and pick Duaer Data → Amap geocoding in China.
2. Fill Address. Optional: City.
3. Limit defaults to 10, max 20. Execute.

A search uses 1 credit only when it returns rows. No rows, wrong input, or an upstream failure uses 0.

## Call the API

- GET https://api.duaer.com/v1/data/amap-geocode?address=%E5%8C%97%E4%BA%AC%E5%B8%82%E6%9C%9D%E9%98%B3%E5%8C%BA%E9%98%9C%E9%80%9A%E4%B8%9C%E5%A4%A7%E8%A1%976%E5%8F%B7
- Authorization: Bearer <Duaer key>

The call skill below matches Copy skill in the Duaer data market, with parameters, examples, and result fields.

## Call skill

Same text as Copy skill.

```
---
name: duaer-amap-geocode
description: >-
  Duaer Amap geocoding in China. Amap: longitude, latitude, and adcode for a Chinese address.
  One successful search uses 1 Duaer credit.
---

# Duaer Amap geocoding in China

Duaer Amap geocoding in China turns a mainland China address into Amap coordinates and its administrative codes. Duaer holds the upstream API key; you only send your Duaer key.

## When to use

- Get coordinates for a delivery address in Beijing.
- Find the adcode of a district.

## When not to use

- Places worldwide. Use https://skills.duaer.com/geocoding.md.
- Shops by keyword. Use https://skills.duaer.com/amap-poi.md.

## Call

`GET https://api.duaer.com/v1/data/amap-geocode?address=%E5%8C%97%E4%BA%AC%E5%B8%82%E6%9C%9D%E9%98%B3%E5%8C%BA%E9%98%9C%E9%80%9A%E4%B8%9C%E5%A4%A7%E8%A1%976%E5%8F%B7`

Header: `Authorization: Bearer <Duaer key>`

Use an account key or a model API key.

Get a Duaer key: https://skills.duaer.com/keys.md

## Parameters

Provide `address`.

- `address` — Address in China, URL-encoded.
- `city` — Optional. City name or adcode to narrow the address.
- `limit` — Optional. Rows to return, from 1 to 20. Default 10.

## Examples

- `GET https://api.duaer.com/v1/data/amap-geocode?address=%E5%8C%97%E4%BA%AC%E5%B8%82%E6%9C%9D%E9%98%B3%E5%8C%BA%E9%98%9C%E9%80%9A%E4%B8%9C%E5%A4%A7%E8%A1%976%E5%8F%B7` — a street address in Chaoyang, Beijing.
- `GET https://api.duaer.com/v1/data/amap-geocode?address=%E8%A5%BF%E6%B9%96&city=hangzhou` — West Lake in Hangzhou.

## Result

The response is `{ "items": [...] }`. Each item has `source`, `title`, `url`, and `summary`, plus:

- `formattedAddress`, `province`, `city`, `district` — address as Amap understands it.
- `adcode`, `level` — administrative code and match level.
- `longitude`, `latitude` — GCJ-02 coordinates.

Fields without a value are left out.

## Credits

A search that returns at least one row uses 1 credit.
An empty search, a search that finds nothing, or a failed search uses 0.
Wrong input returns 400 with a message and uses 0.
No remaining credits returns 402 and does not search.
A missing key returns 401.

## Related

- https://skills.duaer.com/amap-poi.md — Duaer Amap places in China
- https://skills.duaer.com/amap-weather.md — Duaer Amap weather in China

```
## Questions

### How many credits does a Amap geocoding in China search use in Duaer?

One credit when Duaer returns rows. A search with no rows or an error uses 0.

### What is the adcode in Duaer Amap geocoding in China for?

The adcode is the six-digit administrative code. Use it as City in Amap weather, or to group rows by district.

## Related

- [Amap places in China in Duaer](https://doc.duaer.com/getting-started/amap-poi.md)
- [Amap weather in China in Duaer](https://doc.duaer.com/getting-started/amap-weather.md)

