search_places
Pack: geonames · Endpoint: https://gateway.pipeworx.io/geonames/mcp
Search for places (cities, landmarks, regions) by name. Returns coordinates, country, population, and feature type. Example: search_places(“Paris”, “FR”). Use get_nearby to find places near a known location.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_apiKey | string | yes | GeoNames username |
query | string | yes | Place name to search for (e.g., “Tokyo”, “Grand Canyon”) |
country | string | no | ISO 3166-1 alpha-2 country code to filter (e.g., “US”, “JP”) |
limit | number | no | Number of results (default: 10, max: 100) |
Example call
Arguments
{
"_apiKey": "your-geonames-api-key",
"query": "Tokyo"
}
curl
curl -X POST https://gateway.pipeworx.io/geonames/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_places","arguments":{"_apiKey":"your-geonames-api-key","query":"Tokyo"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('search_places', {
"_apiKey": "your-geonames-api-key",
"query": "Tokyo"
});
More examples
{
"_apiKey": "your-geonames-api-key",
"query": "Grand Canyon",
"country": "US",
"limit": 5
}
Response shape
Always returns: query, country, total, returned, places
| Field | Type | Description |
|---|---|---|
query | string | The search query string |
country | string | null | ISO 3166-1 alpha-2 country code filter applied |
total | number | Total results count from API |
returned | number | Number of results in this response |
places | array |
Full JSON Schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query string"
},
"country": {
"type": [
"string",
"null"
],
"description": "ISO 3166-1 alpha-2 country code filter applied"
},
"total": {
"type": "number",
"description": "Total results count from API"
},
"returned": {
"type": "number",
"description": "Number of results in this response"
},
"places": {
"type": "array",
"items": {
"type": "object",
"properties": {
"geoname_id": {
"type": [
"number",
"null"
],
"description": "Unique GeoNames identifier"
},
"name": {
"type": [
"string",
"null"
],
"description": "Place name"
},
"toponym_name": {
"type": [
"string",
"null"
],
"description": "Toponym name variant"
},
"country_code": {
"type": [
"string",
"null"
],
"description": "ISO country code"
},
"country_name": {
"type": [
"string",
"null"
],
"description": "Full country name"
},
"admin_region": {
"type": [
"string",
"null"
],
"description": "Administrative region/state name"
},
"admin_code": {
"type": [
"string",
"null"
],
"description": "Administrative region code"
},
"latitude": {
"type": [
"number",
"null"
],
"description": "Latitude coordinate"
},
"longitude": {
"type": [
"number",
"null"
],
"description": "Longitude coordinate"
},
"population": {
"type": [
"number",
"null"
],
"description": "Population figure"
},
"feature_class": {
"type": [
"string",
"null"
],
"description": "Feature classification"
},
"feature_code": {
"type": [
"string",
"null"
],
"description": "Feature code/type"
},
"distance_km": {
"type": [
"number"
],
"description": "Distance in kilometers (not present in search results)"
}
}
}
}
},
"required": [
"query",
"country",
"total",
"returned",
"places"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"geonames": {
"url": "https://gateway.pipeworx.io/geonames/mcp"
}
}
}
See Getting Started for client-specific install steps.