← Geo og vejr

Søg lande

GET /countrydata/search

Søg lande efter navn med fuzzy matching. Returnerer fulde landeprofiler for hvert match, inkl. hovedstad, befolkning, region, sprog og valuta. Nyttigt til opbygning af autofuldførelses-landesøgefelter og stedvælgere, hvor brugere kan skrive delvise eller omtrentlige landenavne.

Parametre

q påkrævet

Search query

Eksempelforespørgsler

Grundlæggende brug
curl "https://nordapi.ee/api/v1/countrydata/search?q=norway"
Search for Norway
curl "https://nordapi.ee/api/v1/countrydata/search?q=norway"
Search for countries with 'united'
curl "https://nordapi.ee/api/v1/countrydata/search?q=united"
Search for island nations
curl "https://nordapi.ee/api/v1/countrydata/search?q=island"

Livesvar

{
  "count": 1,
  "data": [
    {
      "area_km2": 386224.0,
      "borders": [
        "FIN",
        "SWE",
        "RUS"
      ],
      "capital": "Oslo",
      "code": "NO",
      "code_alpha3": "NOR",
      "continents": [
        "Europe"
      ],
      "currencies": {
        "NOK": {
          "name": "Norwegian krone",
          "symbol": "kr"
        }
      },
      "drives_on": "right",
      "flag_png": "https://flagcdn.com/w320/no.png",
      "flag_svg": "https://flagcdn.com/no.svg",
      "languages": {
        "nno": "Norwegian Nynorsk",
        "nob": "Norwegian Bokmål",
        "smi": "Sami"
      },
      "latitude": 62.0,
      "longitude": 10.0,
      "name": "Norway",
      "official_name": "Kingdom of Norway",
      "population": 5606944,
      "region": "Europe",
      "start_of_week": "monday",
      "subregion": "Northern Europe",
      "timezones": [
        "UTC+01:00"
      ]
    }
  ],
  "success": true
}