Nodes/comfyui_LLM_party/Amap Reverse Geocoding Tool
ComfyUI Node

Amap Reverse Geocoding Tool

Give your LLM agent a Chinese address lookup

By heshengtao·Created 2 years ago·Updated 7 days ago· 2,321
Amap Reverse Geocoding Tool
  • radius
  • tool
location116.310003,39.991957
api_key你的高德API密钥
extensionsall
is_enabletrue

This one only makes sense once you know it's not for your workflow directly - it's for your LLM. comfyui_LLM_party builds agent workflows where an LLM can call tools mid-conversation, and this node is one of those tools: it wraps Amap's (Gaode Maps, the dominant Chinese mapping API - think Baidu Maps' main rival) reverse-geocoding endpoint into something the pack's agent node can hand to a model. Ask an agent something location-flavored and it can call this to turn raw coordinates into a real address.

Reverse geocoding means going from coordinates to an address, not the other way around. Give it a longitude/latitude pair, get back what's actually there.

The inputs and outputs that matter

  • location (default 116.310003,39.991957) - the coordinate pair to look up, in longitude,latitude order. That order is the easy thing to get backwards if you're used to lat-first conventions elsewhere - the default itself is a point in Beijing.
  • api_key - your own Amap Web Service API key. The default placeholder is literally "your Amap API key" in Chinese, a clear signal you must replace it before this does anything.
  • extensions (default all) - how much detail comes back per lookup.
  • radius (default 1000) - the search radius in meters around the coordinate, used for surrounding points of interest rather than just the nearest address.
  • is_enable - the pack's standard bypass toggle.

Output: tool (STRING) - despite the type, this isn't text meant for you to read directly. It's a serialized tool definition meant to be wired into the pack's LLM/agent node's tool-list input, the same shape every other "*_tool" node in this pack produces. Connect it there, not to a text display.

Where it fits, and the honest caveat

This is squarely a China-market tool. If your agent workflow never needs a Chinese address, this node has nothing to offer you - it's not a general geocoder, and Amap's coverage and accuracy are strongest inside China specifically. If you are building something that needs to resolve Chinese coordinates to addresses (a logistics assistant, a location-aware chatbot for a Chinese audience), it's a direct, low-friction way to get that capability into an LLM agent without writing the API integration yourself.

How to install it

Search comfyui_LLM_party in ComfyUI Manager and install, then restart. Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/heshengtao/comfyui_LLM_party.git

Run pip install -r requirements.txt from inside the pack's folder with ComfyUI's own Python, then restart. This node needs nothing beyond a valid Amap API key (get one from Amap's open platform, lbs.amap.com - free tier is available) and an internet connection; no local model, no extra dependency install specific to this node.

Common issues & troubleshooting

Nothing comes back, or the agent says the tool failed. Almost always the API key - an empty, expired, or wrong-permission key at Amap's own console will reject the request before any real geocoding happens. Check the key is a valid Web Service key specifically (Amap issues different key types for web, Android, iOS - a key scoped to the wrong platform won't work here).

Coordinates resolve to the wrong place. Double-check location is longitude first, then latitude - swap them and you'll silently get a real address, just the wrong one, because both values are plausible coordinates on their own.

The agent never calls this tool at all. That's a prompting problem, not a node problem - the LLM only reaches for a tool if its system prompt or the conversation actually gives it a reason to. Make sure your agent's instructions mention it can look up addresses from coordinates, or the model has no reason to know this tool exists for the task at hand.

Category大模型派对(llm_party)/工具(tools)/联网(Networking)

Inputs (5)

NameTypeDefaultDescription
locationSTRING116.310003,39.991957
api_keySTRING你的高德API密钥
extensionsSTRINGall
radiusINTEGER1000
is_enableBOOLEANtrue

Outputs (1)

NameTypeDescription
toolSTRING