Country API Docs

GLOBAL COUNTRY API DOCUMENTATION

GET Continental DATA

The Global Continental Country API is a groundbreaking digital tool designed to provide exhaustive data and insights on countries spanning the globe's continents. This API is not just about geographic coordinates or capitals; it delves deep into the heart of each nation, offering comprehensive details on demographics, economic indicators, cultural nuances, historical milestones, and much more. Whether you're a developer looking to build location-based applications, a researcher aiming for comparative global studies, or an educator in search of authentic resources, this API emerges as a trusted companion. Its integration of data from every continent ensures a holistic understanding of our world, making it indispensable for those striving for a truly global perspective.

Country List

GET https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]
      
Parameter
Key - Required
A secret/unique number to gain access
Exclude - optional, array
Exclude countries from the list by Code


<!-- Example JSON Response -->

[
    {
        "name": "Afghanistan",
        "code": "AF",
        "country-code": "93",
        "states": [
            "Badakhshan",
            "Badghis",
            "Baghlan",
            "Balkh",
            "Bamyan",
            "Daykundi",
            "Farah",
            "Faryab",
            "Ghazni",
            "Ghor",
            "Helmand",
            "Herat",
            "Jowzjan",
            "Kabul",
            "Kandahar",
            "Kapisa",
            "Khost",
            "Kunar",
            "Kunduz",
            "Laghman",
            "Logar",
            "Nangarhar",
            "Nimruz",
            "Nuristan",
            "Paktia",
            "Paktika",
            "Panjshir",
            "Parwan",
            "Samangan",
            "Sar-e Pol",
            "Takhar",
            "Uruzgan",
            "Wardak",
            "Zabul"
        ],
        "official_language": [
            "Dari Persian",
            "Pashto"
        ],
        "capital": "Kabul",
        "region": "South-Central Asia",
        "flag-image": [
            "country_flag_image/AF/og_65d5ad60406a7.jpg",
            "country_flag_image/AF/regular_65d5ad60406a7.jpg",
            "country_flag_image/AF/small_65d5ad60406a7.jpg",
            "country_flag_image/AF/thumbnail_65d5ad60406a7.jpg"
        ],
        "flag-image-svg": "country_flag_image/AF/svg_65d5ad5faa2a7.svg",
        "current_time": "2024-02-21 01:27:51 PM",
        "current_time_24hr": "2024-02-21 01:27:51",
        "coordinates": [
            "33°00′N",
            "65°00′E"
        ]
    }
    ...
]

       
Frontend
Backend
// Example React Component import React, { useState, useEffect } from 'react'; import axios from 'axios'; function App() { const [data, setData] = useState(null); useEffect(() => { async function fetchData() { try { const response = await axios.get(`https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]`); setData(response.data); } catch (error) { console.error("Error fetching data:", error); } } fetchData(); }, []); return ( <div> <h1>API Data</h1> <pre>{JSON.stringify(data, null, 2)}</pre> </div> ); } export default App;
// Example Next.js Component import { useState } from 'react'; import axios from 'axios'; export default function Home() { const [response, setResponse] = useState(null); const Request = async () => { try { const result = await axios.get(`https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]`, { someData: 'test' }); // Replace the data with your actual payload setResponse(result.data); } catch (error) { console.error("Error occured:", error); setResponse(error.message); } }; return ( <div> <button onClick={Request}>Upload Image</button> {response && <div>Response: {JSON.stringify(response)}</div>} </div> ); }
// Example Javascript Component var requestOptions = { method: '', redirect: 'follow' }; fetch(`https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]`, requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
// Example Python Component import requests url = "https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]" payload = {} headers = {} response = requests.request("", url, headers=headers, data=payload) print(response.text)
// Example PHP Component <?php $client = new GuzzleHttp\Client(); $url = "https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]"; $response = $client->request('', $url); echo $response->getBody(); ?>
// Example NodeJS Component const axios = require('axios'); const url = `https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]`; axios.get(url) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
// Example Ruby Component require "uri" require "net/http" url = URI("https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]") http = Net::HTTP.new(url.host, url.port); request = Net::HTTP::.new(url) response = http.request(request) puts response.read_body
// Example Java Component Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.get("https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]") .asString();
// Example C# Component var client = new HttpClient(); var url = $"https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]"; var response = await client.Async(url); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());
// Example Go Component package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]" client := &http.Client {} req, err := http.NewRequest("", url, nil) if err != nil { fmt.Println(err) return } res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
// Example cURL Component curl --location 'https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]'
// Example Swift Component let urlString = "https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]" guard let url = URL(string: urlString) else { return } var request = URLRequest(url: url, timeoutInterval: Double.infinity) request.httpMethod = "" let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) return } print(String(data: data, encoding: .utf8)!) } task.resume()
// Example Dart Component var request = http.Request('', Uri.parse('https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]')); http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { print(await response.stream.bytesToString()); } else { print(response.reasonPhrase); }
// Example Kotlin Component val client = OkHttpClient() val request = Request.Builder() .url("https://continentl.com/api/country-list?page=1&key=[YOUR-API-KEY]") .post(RequestBody.create(null, ByteArray(0))) .build() val response = client.newCall(request).execute()
Currency List

GET https://continentl.com/api/currency-list?key=[YOUR-API-KEY]
      
Parameter
Key - Required
A secret/unique number to gain access
Exclude - optional, array
Exclude currencies from the list by Code


<!-- Example JSON Response -->

[
    {
        "currency_code": "CAD",
        "name": "Canadian Dollar",
        "symbol": "$",
        "ranking": 6
    },
    {
        "currency_code": "JPY",
        "name": "Japanese Yen",
        "symbol": "¥",
        "ranking": 3
    },
    {
        "currency_code": "USD",
        "name": "United States Dollar",
        "symbol": "$",
        "ranking": 1
    },
    ...
]

       
Frontend
Backend
// Example React Component import React, { useState, useEffect } from 'react'; import axios from 'axios'; function App() { const [data, setData] = useState(null); useEffect(() => { async function fetchData() { try { const response = await axios.get(`https://continentl.com/api/currency-list?key=[YOUR-API-KEY]`); setData(response.data); } catch (error) { console.error("Error fetching data:", error); } } fetchData(); }, []); return ( <div> <h1>API Data</h1> <pre>{JSON.stringify(data, null, 2)}</pre> </div> ); } export default App;
// Example Next.js Component import { useState } from 'react'; import axios from 'axios'; export default function Home() { const [response, setResponse] = useState(null); const Request = async () => { try { const result = await axios.get(`https://continentl.com/api/currency-list?key=[YOUR-API-KEY]`, { someData: 'test' }); // Replace the data with your actual payload setResponse(result.data); } catch (error) { console.error("Error occured:", error); setResponse(error.message); } }; return ( <div> <button onClick={Request}>Upload Image</button> {response && <div>Response: {JSON.stringify(response)}</div>} </div> ); }
// Example Javascript Component var requestOptions = { method: '', redirect: 'follow' }; fetch(`https://continentl.com/api/currency-list?key=[YOUR-API-KEY]`, requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
// Example Python Component import requests url = "https://continentl.com/api/currency-list?key=[YOUR-API-KEY]" payload = {} headers = {} response = requests.request("", url, headers=headers, data=payload) print(response.text)
// Example PHP Component <?php $client = new GuzzleHttp\Client(); $url = "https://continentl.com/api/currency-list?key=[YOUR-API-KEY]"; $response = $client->request('', $url); echo $response->getBody(); ?>
// Example NodeJS Component const axios = require('axios'); const url = `https://continentl.com/api/currency-list?key=[YOUR-API-KEY]`; axios.get(url) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
// Example Ruby Component require "uri" require "net/http" url = URI("https://continentl.com/api/currency-list?key=[YOUR-API-KEY]") http = Net::HTTP.new(url.host, url.port); request = Net::HTTP::.new(url) response = http.request(request) puts response.read_body
// Example Java Component Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.get("https://continentl.com/api/currency-list?key=[YOUR-API-KEY]") .asString();
// Example C# Component var client = new HttpClient(); var url = $"https://continentl.com/api/currency-list?key=[YOUR-API-KEY]"; var response = await client.Async(url); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());
// Example Go Component package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://continentl.com/api/currency-list?key=[YOUR-API-KEY]" client := &http.Client {} req, err := http.NewRequest("", url, nil) if err != nil { fmt.Println(err) return } res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
// Example cURL Component curl --location 'https://continentl.com/api/currency-list?key=[YOUR-API-KEY]'
// Example Swift Component let urlString = "https://continentl.com/api/currency-list?key=[YOUR-API-KEY]" guard let url = URL(string: urlString) else { return } var request = URLRequest(url: url, timeoutInterval: Double.infinity) request.httpMethod = "" let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) return } print(String(data: data, encoding: .utf8)!) } task.resume()
// Example Dart Component var request = http.Request('', Uri.parse('https://continentl.com/api/currency-list?key=[YOUR-API-KEY]')); http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { print(await response.stream.bytesToString()); } else { print(response.reasonPhrase); }
// Example Kotlin Component val client = OkHttpClient() val request = Request.Builder() .url("https://continentl.com/api/currency-list?key=[YOUR-API-KEY]") .post(RequestBody.create(null, ByteArray(0))) .build() val response = client.newCall(request).execute()
Currency Exchange Details

GET https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]
      
Parameter
Key - Required
A secret/unique number to gain access
Currency - Required
The main currency you are looking for the exchange for
Amount - optional, default is 1
The amount you are looking for the exchange for


<!-- Example JSON Response -->

[
    "last_update_unix": 1693872002,
    "last_update_utc": "Tue, 05 Sep 2023 00:00:02 +0000",
    "next_update_unix": 1693958402,
    "next_update_utc": "Wed, 06 Sep 2023 00:00:02 +0000",
    "base_code": "CAD",
    "base_symbol":"C$"
    "base_amount": "1",
    "exchange": {
        "CAD": {
            "rate":1,
            "amount":1,
            "symbol":"C$"
        },
        "AED": {
            "rate":2.7018,
            "amount":2.7018,
            "symbol":"د.إ"
        },
        "AFN": {
            "rate":53.9673,
            "amount":53.9673,
            "symbol":"؋"
        },
        ...
    }
]

       
Frontend
Backend
// Example React Component import React, { useState, useEffect } from 'react'; import axios from 'axios'; function App() { const [data, setData] = useState(null); useEffect(() => { async function fetchData() { try { const response = await axios.get(`https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]`); setData(response.data); } catch (error) { console.error("Error fetching data:", error); } } fetchData(); }, []); return ( <div> <h1>API Data</h1> <pre>{JSON.stringify(data, null, 2)}</pre> </div> ); } export default App;
// Example Next.js Component import { useState } from 'react'; import axios from 'axios'; export default function Home() { const [response, setResponse] = useState(null); const Request = async () => { try { const result = await axios.get(`https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]`, { someData: 'test' }); // Replace the data with your actual payload setResponse(result.data); } catch (error) { console.error("Error occured:", error); setResponse(error.message); } }; return ( <div> <button onClick={Request}>Upload Image</button> {response && <div>Response: {JSON.stringify(response)}</div>} </div> ); }
// Example Javascript Component var requestOptions = { method: '', redirect: 'follow' }; fetch(`https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]`, requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
// Example Python Component import requests url = "https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]" payload = {} headers = {} response = requests.request("", url, headers=headers, data=payload) print(response.text)
// Example PHP Component <?php $client = new GuzzleHttp\Client(); $url = "https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]"; $response = $client->request('', $url); echo $response->getBody(); ?>
// Example NodeJS Component const axios = require('axios'); const url = `https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]`; axios.get(url) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
// Example Ruby Component require "uri" require "net/http" url = URI("https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]") http = Net::HTTP.new(url.host, url.port); request = Net::HTTP::.new(url) response = http.request(request) puts response.read_body
// Example Java Component Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.get("https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]") .asString();
// Example C# Component var client = new HttpClient(); var url = $"https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]"; var response = await client.Async(url); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());
// Example Go Component package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]" client := &http.Client {} req, err := http.NewRequest("", url, nil) if err != nil { fmt.Println(err) return } res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
// Example cURL Component curl --location 'https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]'
// Example Swift Component let urlString = "https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]" guard let url = URL(string: urlString) else { return } var request = URLRequest(url: url, timeoutInterval: Double.infinity) request.httpMethod = "" let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) return } print(String(data: data, encoding: .utf8)!) } task.resume()
// Example Dart Component var request = http.Request('', Uri.parse('https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]')); http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { print(await response.stream.bytesToString()); } else { print(response.reasonPhrase); }
// Example Kotlin Component val client = OkHttpClient() val request = Request.Builder() .url("https://continentl.com/api/currency-exchange-details/[currency]?key=[YOUR-API-KEY]") .post(RequestBody.create(null, ByteArray(0))) .build() val response = client.newCall(request).execute()
Two-Way Currency Exchange

GET https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]
      
Parameter
Key - Required
A secret/unique number to gain access
Base - Required
The currency you are looking for the exchange from
Base_amount - optional, default is 1
The amount you are looking for the exchange from
Foreign - Required
The currency you are looking for the exchange for


<!-- Example JSON Response -->

[
    "last_update_unix": 1693872002,
    "last_update_utc": "Tue, 05 Sep 2023 00:00:02 +0000",
    "next_update_unix": 1693958402,
    "next_update_utc": "Wed, 06 Sep 2023 00:00:02 +0000",
    "base_code": "CAD",
    "base_symbol":"C$"
    "base_amount": "1",
    "foreign_code":"USD"
    "foreign_symbol":"$"
    "foreign_rate":1.35
    "foreign_amount":1.35
    ...
]

       
Frontend
Backend
// Example React Component import React, { useState, useEffect } from 'react'; import axios from 'axios'; function App() { const [data, setData] = useState(null); useEffect(() => { async function fetchData() { try { const response = await axios.get(`https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]`); setData(response.data); } catch (error) { console.error("Error fetching data:", error); } } fetchData(); }, []); return ( <div> <h1>API Data</h1> <pre>{JSON.stringify(data, null, 2)}</pre> </div> ); } export default App;
// Example Next.js Component import { useState } from 'react'; import axios from 'axios'; export default function Home() { const [response, setResponse] = useState(null); const Request = async () => { try { const result = await axios.get(`https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]`, { someData: 'test' }); // Replace the data with your actual payload setResponse(result.data); } catch (error) { console.error("Error occured:", error); setResponse(error.message); } }; return ( <div> <button onClick={Request}>Upload Image</button> {response && <div>Response: {JSON.stringify(response)}</div>} </div> ); }
// Example Javascript Component var requestOptions = { method: '', redirect: 'follow' }; fetch(`https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]`, requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
// Example Python Component import requests url = "https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]" payload = {} headers = {} response = requests.request("", url, headers=headers, data=payload) print(response.text)
// Example PHP Component <?php $client = new GuzzleHttp\Client(); $url = "https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]"; $response = $client->request('', $url); echo $response->getBody(); ?>
// Example NodeJS Component const axios = require('axios'); const url = `https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]`; axios.get(url) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); });
// Example Ruby Component require "uri" require "net/http" url = URI("https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]") http = Net::HTTP.new(url.host, url.port); request = Net::HTTP::.new(url) response = http.request(request) puts response.read_body
// Example Java Component Unirest.setTimeouts(0, 0); HttpResponse response = Unirest.get("https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]") .asString();
// Example C# Component var client = new HttpClient(); var url = $"https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]"; var response = await client.Async(url); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());
// Example Go Component package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]" client := &http.Client {} req, err := http.NewRequest("", url, nil) if err != nil { fmt.Println(err) return } res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
// Example cURL Component curl --location 'https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]'
// Example Swift Component let urlString = "https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]" guard let url = URL(string: urlString) else { return } var request = URLRequest(url: url, timeoutInterval: Double.infinity) request.httpMethod = "" let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data else { print(String(describing: error)) return } print(String(data: data, encoding: .utf8)!) } task.resume()
// Example Dart Component var request = http.Request('', Uri.parse('https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]')); http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { print(await response.stream.bytesToString()); } else { print(response.reasonPhrase); }
// Example Kotlin Component val client = OkHttpClient() val request = Request.Builder() .url("https://continentl.com/api/currency-exchange?key=[YOUR-API-KEY]") .post(RequestBody.create(null, ByteArray(0))) .build() val response = client.newCall(request).execute()