---
title: "GET /{lang}/places/geoname"
method: GET
path: "/{lang}/places/geoname"
tags: ["Geographic coordinates of populated place"]
---

# GET /{lang}/places/geoname

`GET /{lang}/places/geoname`

## Request

- Base URL: `https://api.opentripmap.com/0.1`
- URL: `https://api.opentripmap.com/0.1/{lang}/places/geoname`
- Auth: API key in query parameter `apikey`
- TypeScript: <https://skmtc.dev/opentripmap/apis/opentripmap-api/docs/:lang/places/geoname/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns geographic coordinates for the given placename (region, city, village, etc.). The method returns the place whose name is most similar to the search string. Service based on GeoNames database.

## Path parameters

- `lang` string, required

## Query parameters

- `name` string, required
- `country` string

## Response `200`

Returns geographic coordinates

- Geoname
  - `name` string, required: The name of the place
  - `country` string, required: ISO-3166 2-letter country code
  - `lon` number, double, required: Longitude
  - `lat` number, double, required: Latitude
  - `timezone` string: The iana timezone id
  - `population` integer: Population count
  - `partial_match` boolean: A sign that the method did not return an exact match for the requested name

## Other responses

- `404`: Placename is not found

---

[API](https://skmtc.dev/opentripmap/apis/opentripmap-api.md) - [All operations](https://skmtc.dev/opentripmap/apis/opentripmap-api/llms.txt) - [OpenAPI document](https://skmtc.dev/opentripmap/apis/opentripmap-api/revisions/27aa081235f9?raw)
