Resolve country (canonical)
curl --request GET \
--url https://api.reqi.dev/v1/countries/resolveimport requests
url = "https://api.reqi.dev/v1/countries/resolve"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.reqi.dev/v1/countries/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reqi.dev/v1/countries/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reqi.dev/v1/countries/resolve"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reqi.dev/v1/countries/resolve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reqi.dev/v1/countries/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"query": "<string>",
"match": "cca2",
"cca2": "<string>",
"cca3": "<string>",
"name": {
"common": "<string>",
"official": "<string>",
"native": {}
},
"ccn3": "<string>",
"country": {}
}{
"message": "<string>",
"status": 123
}{
"message": "<string>",
"status": 123
}Countries
Resolve country (canonical)
Match a country from free-text query, ISO codes, or maintained aliases. Returns a single object. Use fields= to embed a projected country record. On failure, 404 includes suggestions when matches are ambiguous.
GET
/
v1
/
countries
/
resolve
Resolve country (canonical)
curl --request GET \
--url https://api.reqi.dev/v1/countries/resolveimport requests
url = "https://api.reqi.dev/v1/countries/resolve"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.reqi.dev/v1/countries/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reqi.dev/v1/countries/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reqi.dev/v1/countries/resolve"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reqi.dev/v1/countries/resolve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reqi.dev/v1/countries/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"query": "<string>",
"match": "cca2",
"cca2": "<string>",
"cca3": "<string>",
"name": {
"common": "<string>",
"official": "<string>",
"native": {}
},
"ccn3": "<string>",
"country": {}
}{
"message": "<string>",
"status": 123
}{
"message": "<string>",
"status": 123
}Query Parameters
Country name, alias, or ISO code.
Comma-separated field list. Supports dot paths (name.common). Use * or omit for the full object.