Country API

Usage

This API provides access to country data sorted by country names and FIFA codes. A glossary of country names and FIFA codes can be found here

Base URL

https://api.msmc.cc/api

Endpoints

1. Pull data by name

Description

This endpoint lets you pull country data by the countries name.

Endpoint

/country/name/:country

Method

GET

Parameters

Example Request

/country/name/united states of america

Example Response

{
  "FIFA": "USA",
  "Dial": "1",
  "ISO3166-1-Alpha-3": "USA",
  "MARC": "xxu",
  "is_independent": "Yes",
  "ISO3166-1-numeric": "840",
  "FIPS": "US",
  "WMO": "US",
  "ISO3166-1-Alpha-2": "US",
  "ITU": "USA",
  "IOC": "USA",
  "DS": "USA",
  "ISO4217-currency_name": "US Dollar",
  "Capital": "Washington",
  "Continent": ".us",
  "TLD": "6252001",
  "Geoname ID": null,
  "name": "United States of America"
}

Errors

  1. Status errors: 404 Not Found
  2. Unknown Country: {“error”: “Country not found.”}

2. Pull data by FIFA Code

Description

This endpoint allows you to pull a countries data based on its FIFA code.

Endpoint

``/country/fifa/:code

Method

GET

Parameters

Example Request

/country/fifa/usa

Example Response

{
  "FIFA": "USA",
  "Dial": "1",
  "ISO3166-1-Alpha-3": "USA",
  "MARC": "xxu",
  "is_independent": "Yes",
  "ISO3166-1-numeric": "840",
  "FIPS": "US",
  "WMO": "US",
  "ISO3166-1-Alpha-2": "US",
  "ITU": "USA",
  "IOC": "USA",
  "DS": "USA",
  "ISO4217-currency_name": "US Dollar",
  "Capital": "Washington",
  "Continent": ".us",
  "TLD": "6252001",
  "Geoname ID": null,
  "name": "United States of America"
}

Errors

  1. Status: 404 Not Found
  2. Message: {“error”: “Country not found.”}

Support

For support, email [email protected]