Openmeteo Search Locations
openmeteo_search_locationsResolve a place name to ranked coordinate matches with country, region, elevation, timezone, and population. Required prerequisite for name-based queries — all weather tools take latitude/longitude, not place names. Search by a bare place name (city, region, or landmark); never fold a qualifier into it — pass "Baoding", not "Baoding Hebei", and "Paris", not "Paris, France". To disambiguate places that share a name, set the country input (ISO 3166-1 alpha-2, e.g. "US") and/or read the admin1 and country fields on each ranked result — admin1 is a result field for choosing among matches, not a search input. Returns up to count matches (default 5, at most 100), ranked by population and relevance.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "openmeteo_search_locations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Place name to search — a bare city, region, or landmark ("Seattle", "Mount Rainier"). Do not fold in a region or country qualifier ("Baoding", not "Baoding Hebei"); use the country input to disambiguate. A one- or two-character native-script name ("서울", "大阪") needs the full administrative name ("서울특별시", "大阪市") or the romanized name ("Seoul", "Osaka") — see the language field. Weather tools require coordinates — use the lat/lon from this result. | |
| count | No | Matches to return, most relevant first. Default 5; a larger value returns at most 100 and says so. Ask for more to reach smaller places that share a common name such as "Springfield" or "Portland": the geocoder has no offset, so a place ranked past count is reached only by a larger count or by setting country. | |
| country | No | ISO 3166-1 alpha-2 country code (e.g. "US", "FR") to disambiguate places that share a name. Omit for a global search. | |
| language | No | Language for matching and returning place names (ISO 639-1, e.g., "en", "de", "zh"). The API matches name against the localized index for this language, so set it to match the script of name — e.g. language "zh" for "上海", "ru" for "Москва". This resolves a native-script name of three or more characters, which is matched by normalized prefix; a one- or two-character name must equal an index entry exactly, so setting language alone will not find "서울" or "大阪" — retry those with the full administrative name ("서울특별시", "大阪市") or the romanized name ("Seoul", "Osaka"). Default "en"; a query in a recognized non-Latin script (CJK, Hangul, Cyrillic, Arabic, Greek, Hebrew, Thai, Devanagari) that misses under "en" is retried once with the language inferred from its script, and effective_language on the response names that language when the retry supplied the results. | en |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of results returned | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Everything this response needs to say beyond the data, composed into one advisory: when count was above the geocoder’s maximum of 100, the requested and the applied count; and when the top match’s population is null or under 100,000 — the shape a historic or colonial exonym returns, where the upstream index answers with an unrelated small feature and never surfaces the modern city — the returned place, country, and feature_code, with a request to verify the coordinates or retry with the place’s current official name. Never changes results. | |
| results | No | Ranked matches (most relevant first). Never empty — when nothing matches, the tool fails with no_results instead of returning an empty array. | |
| effective_language | No | ISO 639-1 language the results were matched in, present only when the query missed under the default "en" and the retry with a language inferred from its script found them. The results’ name, country, admin1, and admin2 are localized in that language. Absent when the results were matched in the requested language. |