GET /countrydata/search
按名称模糊搜索国家。返回每个匹配国家的完整资料,包括首都、人口、地区、语言和货币。适用于构建自动补全的国家搜索字段和用户可能输入部分或近似国家名称的位置选择器。
q
必填
Search query
| 名称 | 必填 | 默认值 | 描述 |
|---|---|---|---|
q |
是 | - | Search query |
curl "https://nordapi.ee/api/v1/countrydata/search?q=norway"
curl "https://nordapi.ee/api/v1/countrydata/search?q=norway"
curl "https://nordapi.ee/api/v1/countrydata/search?q=united"
curl "https://nordapi.ee/api/v1/countrydata/search?q=island"
HTTP 502: {
"error": "This API version has been deprecated. Please visit the https://restcountries.com/docs/legacy-api-deprecation to migrate to our new version (v5).",
"success": false
}