入门
在 Duaer 里查地名查询
在 Duaer 里:把地名转换为坐标、国家、行政区、时区、人口与海拔,数据来自 GeoNames 地名库(经 Open-Meteo)。一次成功查询用 1 额度。
能拿到什么
Duaer 数据市场里的「地名查询」:把地名转换为坐标、国家、行政区、时区、人口与海拔,数据来自 GeoNames 地名库(经 Open-Meteo)。查到结果时用 1 额度,结果交给数字组织的下一个节点。
从节点创建器选 Duaer 数据 → 地名查询,或打开 数据市场。相关:海拔高程、天气预报。
适合做什么
- 调用按坐标查询的数据源前,先把地名换成经纬度。
- 区分同名地点,例如多个 Springfield。
在画布里检索
- 打开节点创建器,选 Duaer 数据 → Place lookup。
- 填 Place(如 Springfield);Country 可选(两位国家代码,如 US)。
- Limit 默认 10,最大 20。执行。
查到结果才扣 1 额度;没有结果、输入有误或上游失败都不扣。
用 API 调用
- GET https://api.duaer.com/v1/data/geocoding?place=Springfield&country=US
- Authorization: Bearer <Duaer key>
下方是与数据市场「复制技能」相同的英文技能,含参数、示例与返回字段。
调用技能(英文)
与数据市场「复制技能」一致。
---
name: duaer-geocoding
description: >-
Duaer Place lookup. Turn a place name into coordinates, country, region, time zone, population, and elevation from the GeoNames gazetteer via Open-Meteo.
One successful search uses 1 Duaer credit.
---
# Duaer Place lookup
Duaer Place lookup turns a city, town, or place name into coordinates and basic facts. Several places can share a name, so Duaer returns the best matches first; add `country` to narrow them.
## When to use
- Get latitude and longitude before calling a point-based source.
- Tell apart places that share a name, such as Springfield.
## When not to use
- Weather at a place. Use https://skills.duaer.com/weather.md.
- Ground height only. Use https://skills.duaer.com/elevation.md.
## Call
`GET https://api.duaer.com/v1/data/geocoding?place=Springfield&country=US`
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 `place`.
- `place` — City, town, or place name, such as Springfield.
- `country` — Optional. Two-letter country code, such as US.
- `limit` — Optional. Rows to return, from 1 to 20. Default 10.
## Examples
- `GET https://api.duaer.com/v1/data/geocoding?place=Springfield&country=US` — places called Springfield in the United States.
- `GET https://api.duaer.com/v1/data/geocoding?place=Kyoto&limit=1` — the best match for Kyoto.
## Result
The response is `{ "items": [...] }`. Each item has `source`, `title`, `url`, and `summary`, plus:
- `name`, `country`, `countryCode`, `region`, `district` — place and its administrative areas.
- `latitude`, `longitude`, `timezone` — position and IANA time zone.
- `population`, `elevationM` — people and height above sea level, when known.
- `featureCode`, `geonameId` — GeoNames feature class and id.
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/elevation.md — Duaer Elevation
- https://skills.duaer.com/weather.md — Duaer Weather forecast
常见问题
Duaer 的地名查询检索扣多少额度?
查到结果时扣 1 额度;没有结果或出错不扣。
Duaer 地名查询遇到同名地点怎么办?
在 Duaer 地名查询里加 Country(两位代码)缩小范围,结果按匹配度排序。
同组