Search Geonames
search_geonamesSearch for places (cities, towns, landmarks, regions) by name and get which STATE / PROVINCE / COUNTY / PREFECTURE / administrative division (German Bundesland, UK county, Canadian province, Japanese prefecture, Indian/Australian/Mexican state, etc.) they are in, plus country, coordinates, population, and feature type. Answers "what state is in", "which US/German/Australian state is in", "what province/county/prefecture/region is in", the admin_region field is the state/province/county/prefecture (e.g. search_geonames("Naperville", "US") -> Illinois; ("Heidelberg", "DE") -> Baden-Württemberg; ("Leeds", "GB") -> England; ("Osaka", "JP") -> Osaka). Worldwide coverage. Example: search_geonames("Paris", "FR"). Use get_nearby to find places near a known location.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "Tokyo"
},
"name": "search_geonames"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of results (default: 10, max: 100) | |
| query | Yes | Place name to search for (e.g., "Tokyo", "Grand Canyon") | |
| _apiKey | Yes | GeoNames username | |
| country | No | ISO 3166-1 alpha-2 country code to filter (e.g., "US", "JP") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query string | |
| total | Yes | Total results count from API | |
| places | Yes | ||
| country | Yes | ISO 3166-1 alpha-2 country code filter applied | |
| returned | Yes | Number of results in this response |