Public APIs
Graph Countries favicon

Graph Countries

Geocoding

Country-related data like currencies, languages, flags, regions+subregions and bordering countries.

Graph Countries's website screenshot

About Graph Countries

Graph Countries is a GraphQL API for querying country-related data, based on the same dataset as restcountries.eu, offered free of charge and without usage restrictions. It exposes information including countries, timezones, currencies, languages, regions and subregions, top-level domains, calling codes, flags, bordering countries, and translations. It also supports computed queries such as shortest path between countries and distance to other countries, along with selection, pagination, filtering, searching, and ordering across entities.

The underlying data is scraped from restcountries.eu and stored in a Neo4j graph database, with the GraphQL schema inferred using the neo4j-graphql-js package and custom Cypher queries added for path and distance calculations. An Apollo server provides the GraphQL endpoint and an interactive playground for exploring queries.

The project can be used via its hosted endpoint or self-hosted by cloning the repository and connecting it to a Neo4j graph database with the APOC plugin installed, requiring Node.js and npm. It is intended for developers who need structured, queryable country data through a GraphQL interface, including graph-based relationships like bordering countries and route distances.

Key features

  • GraphQL API for country-related data (timezones, currencies, languages, calling codes, flags, borders)
  • Free to use without restrictions
  • Supports select, paginate, filter, search and order on any entity
  • Shortest path and distance queries between countries via custom Cypher queries
  • Self-hostable with your own Neo4j graph database
  • Includes GraphQL playground and GraphQL Voyager schema explorer

Frequently asked questions

Is Graph Countries free to use?

Yes, it is free of charge and without restrictions.

What API technology does it use?

It exposes a GraphQL endpoint, built with Apollo Server on top of a Neo4j graph database.

Can I self-host it?

Yes, you can clone the repo and host it yourself, but you need your own Neo4j graph database with the APOC plugin installed.

Where does the data come from?

The data is scraped from restcountries.eu and inserted into a Neo4j graph database, with added flag emojis.

What kind of queries does it support?

It supports queries for countries, timezones, currencies, languages, regions, calling codes, flags, bordering countries, translations, and shortest path/distance between countries.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product