cs_get_place_geonames_id
Get the GeoNames ID for any place by providing its name. Useful for quick lookups when you only need the identifier.
Instructions
Get the GeoNames ID for a place (convenience function).
PURPOSE: Quick lookup of a single GeoNames ID for a place.
WHEN TO USE:
When you just need the ID without details
For quick place-to-ID conversion
When you're confident about the place name
WHEN NOT TO USE:
When the place name might be ambiguous → use search_for_geonames_id()
When you need full place details
Args: place_name: Name of the place (e.g., "Berlin", "Paris") country: Optional ISO-2 country code to restrict search (e.g., "DE")
Returns: GeoNames ID as integer, or None if not found
Example: >>> berlin_id = await get_place_geonames_id("Berlin", country="DE") >>> # Returns: 2950159 >>> letters = await search_correspondences(place_geonames=str(berlin_id))
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country | No | ||
| place_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |