Nager.Date/getCountry

暂不支持在线调用 · 原因见下方

Nager.DateNager.Date 公共节假日 API

GET/api/v4/Countries/{countryCode}

查询国家信息

使用 ISO 3166-1 alpha-2 国家代码查询国家名称、地区和可用的陆地边界信息。

查询支持国家、国家资料、年度或未来公共节假日、当天节假日状态与服务版本。完整 Community API v4 仅含六个只读 Endpoint;商业使用需要有效赞助。

请求

operationId
getCountry
服务器
https://nagerholidays.com
认证

请求参数

countryCode

pathstring必填

ISO 3166-1 alpha-2 国家代码。

US

响应

200

CountryInfoWithBordersDtoapplication/json

请求成功。

字段: borderscommonNamecountryCodenativeNameofficialNameregion

404

ProblemDetailsapplication/json

未找到指定国家或资源。

字段: detailinstancestatustitletype

{
  "borders": {
    "commonName": "United States",
    "countryCode": "US",
    "nativeName": "United States",
    "officialName": "United States of America",
    "region": "Americas"
  },
  "commonName": "United States",
  "countryCode": "US",
  "nativeName": "United States",
  "officialName": "United States of America",
  "region": "Americas"
}