Get Countries
GET
/web/constants/countries NoneReturns 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
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Required | Enum name identifier (e.g., "US", "CN") |
value | integer | Required | 8-digit numeric code for API usage |
label | string | Required | Localized display name based on Accept-Language header |
alpha2Code | string | Required | ISO 3166-1 alpha-2 code (e.g., "US") |
alpha3Code | string | Required | ISO 3166-1 alpha-3 code (e.g., "USA") |
numericCode | integer | Required | ISO 3166-1 numeric code (e.g., 840) |
phoneCode | string | Required | International dialing code (e.g., "1") |
Error Responses
| HTTP Status | Code | Message | Description |
|---|---|---|---|
| 500 | "5000" | "INTERNAL_SERVER_ERROR" | Unexpected server error |
Notes
- Response is cached for 24 hours for performance optimization.
- The
labelfield is localized; sendAccept-Language: zh-CNfor Chinese labels. - The
UNKNOWNcountry value is excluded from the response.