Get a country's bordering countries

List the countries that share a land border with any country — as full records, not just ISO codes. One request, no API key.

Back

A "countries that border X" feature — for a map, a quiz, a shipping rule — normally means storing the adjacency list yourself and joining ISO codes by hand. You can skip that.

One request

/borders/{country} takes a country name and returns its neighbours as full records, not bare codes:

curl https://countries.dev/borders/Germany

Germany comes back with nine countries, each a complete object — so you can render flags and names straight from the response:

const neighbours = await fetch("https://countries.dev/borders/Germany").then((r) => r.json());
neighbours.map((c) => `${c.flag} ${c.name}`);

Islands have no neighbours

Land borders only, so island nations return a 404:

curl https://countries.dev/borders/Japan   # 404 — no land borders

Handle that as "no neighbours" rather than an error. If you'd rather work with the raw adjacency codes, every country object also has a borders array of alpha-3 codes.

Borders endpoint docs →

Written by

Dov Azencot

At

Tue Jun 23 2026