Graph Countries API
Overview
Graph Countries API provides rich country data including currencies, languages, flags, bordering countries, and regional groupings via GraphQL. It is completely free with no authentication required, making it ideal for learning or building geography-based features. Send a GraphQL query to retrieve exactly the fields you need.
Beginner Tip
This API uses GraphQL instead of REST, so you send a POST request with a JSON body containing your query. Use the GraphQL playground at the GitHub project to explore available fields before writing code.
Available Data
Example Response
{
"name": "Japan",
"capital": "Tokyo",
"population": 125800000,
"region": "Asia",
"languages": [
"Japanese"
],
"flag": "https://flagcdn.com/jp.svg",
"currencies": [
{
"code": "JPY",
"name": "Japanese yen"
}
]
} Field Reference
data Top-level GraphQL response containing your requested data. data.country.name The full English name of the country. data.country.capital The capital city of the country. data.country.currency Currency code used in the country, e.g. USD, EUR. data.country.languages List of language objects with name and native name fields. data.country.emoji Flag emoji representing the country. Implementation Example
const url = "https://github.com/lennertVanSever/graphcountries";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →administrative-divisons-db
⭐ Beginner's PickThe Administrative Divisions DB API provides a structured list of all administrative divisions (states, provinces, regions, cities) for countries around the world.
adresse.data.gouv.fr
adresse.data.gouv.fr provides programmatic access to address database of france, geocoding and reverse via REST API.
Airtel IP
⭐ Beginner's PickAirtel IP is a free, no-auth IP geolocation API that aggregates data from multiple sources to return the country associated with any given IP address.
bng2latlong
⭐ Beginner's Pickbng2latlong is a simple, free API that converts British National Grid (OSGB36) easting and northing coordinates into standard WGS84 latitude and longitude.
Cartes.io
⭐ Beginner's PickCartes.io is a free API that lets you create maps and add custom markers without signing up.