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

Country Lookup API

GET

Match any country or ISO code to its capital, codes, and region.

Country Lookup matches any country name or ISO code to its official names, ISO 3166 codes, capitals, region, languages, and flag emoji. Paid plans add coordinates and major cities, and with details=true demonyms, land area and UN membership.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/countrylookup?country=USA
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": {
    "search": "USA",
    "countries": [
      {
        "name": {
          "common": "United States",
          "official": "United States of America",
          "native": {
            "eng": {
              "official": "United States of America",
              "common": "United States"
            }
          }
        },
        "tld": [
          ".us"
        ],
        "cca2": "US",
        "ccn3": "840",
        "cca3": "USA",
        "cioc": "USA",
        "independent": true,
        "status": "officially-assigned",
        "unRegionalGroup": "Western European and Others Group",
        "capital": [
          "Washington D.C."
        ],
        "altSpellings": [
          "US",
          "USA",
          "United States of America"
        ],
        "region": "Americas",
        "subregion": "North America",
        "languages": {
          "eng": "English"
        },
        "latlng": [
          38,
          -97
        ],
        "landlocked": false,
        "flag": "🇺🇸",
        "area": 9372610,
        "demonyms": {
          "eng": {
            "f": "American",
            "m": "American"
          },
          "fra": {
            "f": "Américaine",
            "m": "Américain"
          }
        },
        "unMember": true
      }
    ]
  }
}

About the Country Lookup API

Pass a common country name, alternate spelling, or ISO 3166 code in the query. It also works as a lightweight country flag API, since every record carries the country's flag emoji, and paid plans add each country's native name. The service searches a dataset of 250 countries, returning matching records with capitals, domain extensions, region groupings, and mapped official languages. On paid plans, setting details to true adds the English and French demonyms, total area in square kilometers and UN membership. Paid plans can set the major cities parameter to include prominent urban centers along with geographic coordinates.

What people use it for

Customs Declaration Filling
When generating export manifests, logistics software queries the destination ISO code to append standardized official country names and regions.
Locale Preference Detection
E-commerce platforms resolve visitor country codes to display corresponding official languages and flag icons on storefront headers.
Global Vendor Profiling
Standardize supplier databases by resolving freeform location text into uniform ISO alpha-3 codes, capital cities, and top-level domains.
Traveler Briefing Packs
Travel booking apps supply passengers with destination briefing cards containing capital cities, spoken languages, and regional groupings before departure.

Worked example: Turn an ISO code into country data

A checkout form stores the two-letter code DE and needs the country's name, capital and languages to show it back to the customer.

Request
curl "https://api.apiverve.com/v1/countrylookup?country=DE" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "status": "ok",
  "error": null,
  "data": {
    "search": "DE",
    "countries": [
      {
        "name": {
          "common": "Germany",
          "official": "Federal Republic of Germany",
          "native": { "deu": { "official": "Bundesrepublik Deutschland", "common": "Deutschland" } }
        },
        "tld": [".de"],
        "cca2": "DE",
        "ccn3": "276",
        "cca3": "DEU",
        "cioc": "GER",
        "independent": true,
        "status": "officially-assigned",
        "capital": ["Berlin"],
        "region": "Europe",
        "subregion": "Western Europe",
        "languages": { "deu": "German" },
        "latlng": [51, 9],
        "landlocked": false,
        "flag": "🇩🇪"
      }
    ]
  }
}

DE, DEU and Germany all return this same record, so the field can hold whatever your form collected.

Results come back as a countries array: read countries[0] for a code lookup.

Edge cases and limits

Territories are included
Check independent and status before treating an entry as a sovereign state.
Several codes per country
cca2 and cca3 are ISO 3166 alpha-2 and alpha-3, ccn3 is the numeric code, and cioc is the Olympic code, which often differs (GER, not DEU).
Languages by ISO 639-3
languages is keyed by three-letter language codes (deu), and name.native uses the same keys.
Flag is an emoji
flag is a Unicode emoji, not an image. Flag images come from the Country Flags API, linked below.

Compared with the alternatives

A JSON file in your repo
No network call, but you update it yourself when names, codes or capitals change, and every service keeps its own copy.
Free community APIs
They work until they're rate-limited or go offline. This one runs on the same key and credit balance as the other APIVerve APIs you use. For flag images, see the Country Flags API.

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 Lookup

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

Questions.

Common questions about the Country Lookup API.

Read the docs →
Can I search by ISO code or only by full country name?
You can search by either. The endpoint accepts common country names, official names, or standard ISO 3166-1 codes like two-letter or three-letter abbreviations, covering 250 countries globally.
Can I get coordinates and major cities on the Free plan?
No, geographic coordinates and the major cities lookup parameter require a paid plan. The Free plan also excludes native names, numeric country codes, Olympic codes, independence status, and landlocked indicators, as well as the demonyms, land area and UN membership that details=true adds. Upgrading to Starter or above unlocks all of these fields.
How far does the Starter plan go for country lookups?
Each query costs 2 credits. On the Starter plan, your monthly balance covers 100,000 country lookups, which works out to about $0.30 per 1,000 calls. The Free plan provides 100 lookups per month.
What does the country dataset cover?
The database covers 250 countries, with boundary designations, regional group memberships, and administrative details for each.
Can I use country lookup data in a commercial SaaS application?
Yes, provided you are on a paid plan, as the Free plan is restricted to non-commercial projects. You can store and present country details inside your own application, but redistributing or reselling the raw dataset is prohibited.

Ready to build with Country Lookup? 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