TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Get a country by ISO 3166-1 code

GEThttps://api.testingapis.com/api/Countries/code/{code}Sign in to see this endpoint's URL

Parameters 1

NameTypeDescription
coderequiredpath · stringAlpha-2 (JP) or alpha-3 (JPN) code, case-insensitive.

Responses

200
The country.
404
No country with this code does not exist.

Example

Request
curl -X GET "https://api.testingapis.com/api/Countries/code/JP" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "id": 18,
  "name": "Japan",
  "code": "JP",
  "code3": "JPN",
  "capital": "Tokyo",
  "region": "Asia",
  "population": 125700000,
  "area": 377930,
  "currency": {"code": "JPY", "name": "Japanese yen", "symbol": "¥"},
  "languages": ["Japanese"],
  "callingCode": "+81",
  "flag": "🇯🇵",
  "timezones": ["UTC+09:00"]
… (1 more lines)

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.