REST Countries

REST Countries

Geocoding

Get information about countries via a RESTful API

Visit API

📚 Documentation & Examples

Everything you need to integrate with REST Countries

🚀 Quick Start Examples

REST Countries Javascript Examplejavascript
// REST Countries API Example
const response = await fetch('https://restcountries.com', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

The REST Countries API is a powerful and user-friendly interface that allows developers to access comprehensive information about countries around the world. This API provides a wide array of data, including country names, population statistics, area size, currency information, languages spoken, and much more. By integrating this API into your applications, you can enrich user experiences with real-time data and create features like travel guides, educational tools, and geographical applications. With an easy-to-use endpoint structure, REST Countries API ensures that retrieving data about any country is both efficient and straightforward for developers of all skill levels.

Here are five benefits of using the REST Countries API:

  • Access to a vast database of country-specific information.
  • Free to use with no authentication required.
  • Provides detailed data formats, including JSON, which is suitable for modern web applications.
  • Easily integrated into various programming environments, enhancing rapid development.
  • Regularly updated to reflect changes in national data, ensuring accuracy and reliability.

Here is a simple JavaScript code example to call the REST Countries API and fetch information about a specific country, such as France:

fetch('https://restcountries.com/v3.1/name/france')
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    return response.json();
  })
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error('There has been a problem with your fetch operation:', error);
  });
🔒

Security Assessment

F
🔒HTTPS
Enabled
SSL Grade: T
đŸ›Ąī¸Headers
0/100
🕒Last Assessed
1 weeks ago
â„šī¸Click for detailed analysis

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 6Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 28Jun 30Jul 2Jul 504008001440Minutes
Online
Offline

Related APIs in Geocoding