QWeather Geo City Lookup
1 credits/call
ae_qweather_geo_city_lookup
Search for cities by name or coordinates to get location IDs and details needed for weather forecasts.
1 credits/call
Pricing
1 credits/call
| Condition | Charge |
|---|---|
| Each call | 1 credits/call |
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
adm | string | No | Administrative division filter. | — |
lang | string | No | Language code. | — |
range | string | No | Search range. | — |
number | integer | No | Maximum number of returned records. | — |
location | string | Yes | Location keyword or id. | — |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_qweather_geo_city_lookup' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"lang": "zh",
"location": "上海",
"number": 2
}
}'Response exampleresponse.json
{
"code": "200",
"location": [
{
"adm1": "上海市",
"adm2": "上海",
"country": "中国",
"id": "101020100",
"name": "上海",
"type": "city"
}
],
"refer": {
"license": [
"QWeather Developers License"
],
"sources": [
"QWeather"
]
}
}This example shows part of the response. Copied content is valid JSON.
