NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Country Borders API

GET

Find every country that shares a land border with any nation.

Country Borders identifies adjacent nations by two-letter ISO country code. It returns the list of bordering countries along with region, subregion, and landlocked status.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/countryborders?country=CA
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "country": "Canada",
    "cca2": "CA",
    "landlocked": false,
    "region": "Americas",
    "subregion": "Northern America",
    "coordinates": {
      "lat": 60,
      "lng": -95
    },
    "borders": [
      "USA"
    ]
  }
}

About the Country Borders API

Country Borders is a country border list lookup: pass a two-letter ISO country code and get back the neighboring countries that share a land boundary with it. The response names the country and adds its region, subregion and a landlocked country check, so one call answers both who are this country's neighbors and whether it has access to the sea.

Travel and logistics apps use it to suggest overland routes and cross-border options, education and quiz apps use it for geography questions, and data teams use the bordering countries list to group or compare adjacent nations in maps and reports.

The Free plan returns the country name, its ISO code, region, subregion, landlocked flag and the full list of borders. Paid plans add a latitude and longitude for the requested country, a representative center point that is handy for placing a marker or centring a map on the country you looked up.

How it works

The country parameter takes an ISO 3166-1 alpha-2 code such as CA or de; it is trimmed and uppercased before lookup. The code is resolved against a country code reference, then matched to a world countries dataset for the common name, the landlocked flag and the center coordinates, and finally to a borders dataset keyed by the same two-letter code. A code that fails any of these steps returns a 404 with country not found.

borders lists each neighbor by its three-letter ISO 3166-1 alpha-3 code, for example ["USA"] for Canada, rather than by name. Map them to names with a country lookup if you need to display them. The list covers land borders only; when the dataset records no land neighbors for a country, the array is empty.

country is the common English name and cca2 the two-letter code. region and subregion come from the borders dataset and use broad groupings such as Americas and Northern America for Canada. landlocked is true when the country has no coastline.

coordinates.lat and coordinates.lng are the country's representative point from the world countries dataset, often rounded to whole degrees (Canada is 60, -95). Treat them as a point to centre a map on, not as a geometric centroid or a capital city location. They are null on the Free plan; every other field is returned on all plans.

What people use it for

Cross-Border Route Planning
Freight dispatchers check adjacent nations along transport corridors to verify transit jurisdictions and identify landlocked destinations needing sea-port rerouting.
Regional Market Expansion
E-commerce platforms identify neighboring territories around existing warehouses to sequence regional delivery coverage country by country.
Geopolitical Strategy Games
Game developers build realistic adjacency maps between territories to enforce valid troop movements across shared national borders.
Compliance Risk Screening
When auditing vendor supply chains, trade compliance officers flag suppliers operating adjacent to sanctioned territories.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Country Borders

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Country Borders API.

Read the docs →
Can I query a country using its full name instead of an ISO code?
No, queries require the standard two-letter ISO country code, such as CA for Canada or DE for Germany. Country Borders returns the full country name along with its geographic details in the response.
Does the API report whether a country is landlocked?
Yes, each response includes a landlocked indicator showing whether the country has ocean access. It also returns the geographic region, subregion, and the list of neighboring country names that share a border.
Are country center point coordinates included on the Free plan?
No, latitude and longitude coordinates for the country center point are premium fields. Any paid plan, starting with Starter, unlocks coordinate data along with the neighboring border list.
How far does the Starter plan go for country border lookups?
Each lookup uses 2 credits. Starter provides 200,000 credits per month, covering up to 100,000 country border lookups at about $0.30 per 1,000 calls. The Free plan includes 100 lookups each month.
Can I use the border data in a commercial mapping or logistics app?
Yes, commercial use is allowed on any paid plan. You can display and use the border and regional data inside your own software, but you cannot resell or redistribute the raw data as-is.

Ready to build with Country Borders? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs