Get country information

Get country information for the specified country. If the input can not be matched to a supported country the response will have a 404 status code, and the result will be a null value.

URL template

The REST API requires GET requests. Parameters are added to the REST resource URL, and each parameter must be URL-encoded:

https://api.postcode.eu/international/v1/country/{country}

Example REST request

Retrieving /international/v1/country/germany with the proper authentication would use the following HTTP Request:

GET /international/v1/country/germany HTTP/1.1
Host: api.postcode.eu
Authorization: Basic 2eTpkU******…

Example response

The lookup is successful so we receive a 200 OK status in the headers:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

And a JSON response in the body:

{
	"name":"Germany",
	"iso3":"DEU",
	"iso2":"DE"
}

Parameters

country: string

A country name, or ISO code.

Returns

name: string

The country name in English.

iso3: string

The ISO 3166-1 Alpha-3 code for the country. Use as the initial context parameter for the autocomplete method.

iso2: string

The ISO 3166-1 Alpha-2 code for the country.