single
Returns a country for the selected IP.
Returns a country for the selected IP in two letter ISO-3166 format. If the country is not available, it will return an empty string.
get/{ip}/country
Request
- Base URLhttps://ipinfo.io
- Auth
- HTTP basic
- or HTTP bearer
- or API key in query parameter token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
ipstring required
A single IPv4 or IPv6 IP address.
Response
Name of the country in the 2 letter ISO 3166-1 alpha-2 for the IP address.
Changes
No recorded changes to this operation across all 1 revision of this API.