Skip to content

Get Countries

GET/web/constants/countries None

Returns a list of all supported countries with ISO standard codes and phone codes. The response is localized based on the Accept-Language request header. This endpoint returns approximately 180+ countries and the response is cached for 24 hours due to its large payload size (50-80KB). The UNKNOWN value is excluded from the results.

Authentication

No authentication required. This is a public endpoint.

Request Parameters

None.

Success Response

Success 200
{
  "code": "2000",
  "message": "SUCCESS",
  "data": [
    {
      "code": "US",
      "value": 95010301,
      "label": "United States",
      "alpha2Code": "US",
      "alpha3Code": "USA",
      "numericCode": 840,
      "phoneCode": "1"
    },
    {
      "code": "CN",
      "value": 95010302,
      "label": "China",
      "alpha2Code": "CN",
      "alpha3Code": "CHN",
      "numericCode": 156,
      "phoneCode": "86"
    }
  ]
}

Response Fields

NameTypeRequiredDescription
codestringRequiredEnum name identifier (e.g., "US", "CN")
valueintegerRequired8-digit numeric code for API usage
labelstringRequiredLocalized display name based on Accept-Language header
alpha2CodestringRequiredISO 3166-1 alpha-2 code (e.g., "US")
alpha3CodestringRequiredISO 3166-1 alpha-3 code (e.g., "USA")
numericCodeintegerRequiredISO 3166-1 numeric code (e.g., 840)
phoneCodestringRequiredInternational dialing code (e.g., "1")

Error Responses

HTTP StatusCodeMessageDescription
500"5000""INTERNAL_SERVER_ERROR"Unexpected server error

Notes

  • Response is cached for 24 hours for performance optimization.
  • The label field is localized; send Accept-Language: zh-CN for Chinese labels.
  • The UNKNOWN country value is excluded from the response.

SlaunchX Internal Documentation