Overview
Pass a common country name, alternate spelling, or ISO 3166 code in the query. The service searches a monthly updated dataset of 250 countries, returning matching records with capitals, domain extensions, region groupings, and mapped official languages. Paid plans can set the major cities parameter to include prominent urban centers along with geographic coordinates.
Live Test Country Lookup Source →
Formula
One function covers the whole catalog: the first argument names the source, the rest are its inputs, and the "field" pair says which single value lands in the cell. Formulas covers the grammar that applies to all of them.
=VERVE("countrylookup", A2, "field", "search")=VERVE.CALL("countrylookup", A2, "field", "search")A2 holds the country you are looking up. Drag the formula down and each row resolves on its own.
With literal values
Nothing has to come from a cell — typed values work the same way.
=VERVE("countrylookup", "USA", "field", "search")=VERVE.CALL("countrylookup", "USA", "field", "search")Inputs
Required inputs are positional, in the order below. Everything else is passed as a "name", value pair after them — the same shape as SUMIFS. Premium inputs are accepted on every plan but only take effect on plans that include them.
| Input | Type | Where it goes | Description |
|---|---|---|---|
countryRequired | string | argument 2 (A2) | The Country name or ISO code of the country for which you want to get the data (e.g., USA) |
majorcitiesOptionalPremium | boolean | "majorcities", value | Specify if you would like to return all major cities of the country found |
Passing an option
=VERVE("countrylookup", A2, "majorcities", "true")=VERVE.CALL("countrylookup", A2, "majorcities", "true")What lands in your sheet
The "field" pair is what makes the formula resolve to one cell. Its value is a dot-path from the table below, so swapping it is how you pull a different value — one formula per column.
Seeing everything at once
Drop the "field" pair and the formula returns the whole response instead: two columns, field name on the left and value on the right, spilling from the cell you typed in.
=VERVE("countrylookup", A2)=VERVE.CALL("countrylookup", A2)The second row's table would land on top of the first's, and every cell after the first reads #REF! (#SPILL! in Excel). Keep one per sheet, or name a field, and leave the cells below and to the right empty.
Response fields
Paths are relative to data. Each one is exactly what the "field" pair accepts, so swapping it is how you pull a different value into a cell. On a plan without a Premium field the cell reads #PREMIUM(field) rather than a value, so a locked field never looks like a real answer.
| Use as "field" | Type | Example cell value | Description |
|---|---|---|---|
search | string | USA | The search term or country code used in the lookup request |
countries | array[1] | Array of country objects matching the search criteria | |
countries.0.name | object | {…} | The country's names: common, official, and native forms |
countries.0.name.common | string | United States | Common name of the country used in everyday reference |
countries.0.name.official | string | United States of America | Official formal name of the country recognized internationally |
countries.0.name.nativePremium | object | {…} | Native language names of the country keyed by language code |
countries.0.name.native.engPremium | object | {…} | |
countries.0.name.native.eng.officialPremium | string | United States of America | |
countries.0.name.native.eng.commonPremium | string | United States | |
countries.0.tld | array | [".us"] | Top-level domains associated with the country |
countries.0.cca2 | string | US | Two-letter country code following ISO 3166-1 alpha-2 standard |
countries.0.ccn3Premium | string | 840 | Three-digit country code following ISO 3166-1 numeric standard |
countries.0.cca3 | string | USA | Three-letter country code following ISO 3166-1 alpha-3 standard |
countries.0.ciocPremium | string | USA | International Olympic Committee country code for sports competitions |
countries.0.independentPremium | boolean | true | Indicates whether the country is politically independent |
countries.0.statusPremium | string | officially-assigned | Official assignment status of the country code in international records |
countries.0.unRegionalGroup | string | Western European and Others Group | UN regional group the country belongs to |
countries.0.capital | array | ["Washington D.C."] | Array of capital city or cities of the country |
countries.0.altSpellings | array | ["US","USA","United States of America"] | Alternative spellings and abbreviations of the country name |
countries.0.region | string | Americas | Geographic region where the country is located globally |
countries.0.subregion | string | North America | More specific geographic subregion classification of the country |
countries.0.languages | object | {…} | Object mapping language codes to official language names |
countries.0.languages.eng | string | English | |
countries.0.latlngPremium | array | [38,-97] | Array with latitude and longitude coordinates for country center |
countries.0.landlockedPremium | boolean | false | Indicates whether the country has no ocean or sea coastline |
countries.0.flag | string | 🇺🇸 | Unicode flag emoji representation of the country |
Filling a whole column
Both platforms make one batched call for a column rather than one request per cell, and both cost the same — 2 credits per row looked up. How you write it differs, because the two runtimes batch at different points.
=VERVE("countrylookup", A2:A100, "field", "search")In Google Sheets, give the arguments ranges and the answers spill down from the cell you typed in. Custom functions there run synchronously and in isolation, so dragged cells cannot be coalesced — the range form is how a column becomes one call. The "field" pair is required here: a per-row two-column table has nowhere to spill. Use a full column per input (A2:A100, not A2) — a single-cell reference is read as row 1 only and the rest of the column comes back blank.
In Excel, type the formula once and fill down — no range form and none needed, because its runtime is asynchronous and the add-in coalesces the calls a fill produces into a single batched request. Do not hand VERVE.CALL a range: Excel flattens it into positional arguments, so A2:A100 arrives as a hundred separate arguments and the cell reads #ERR rather than filling.
Either way, column A holds your country values and the answers land beside them, one row each, blank rows skipped.
When a cell doesn't fill
A failed lookup returns readable text starting with #ERR rather than a spreadsheet error, because Excel cannot show a custom message on a real error — you would get a bare #VALUE! with no reason. The trade-off is that IFERROR() will not catch it; test with LEFT(cell, 4) = "#ERR" instead. Error handling covers the rest.
| Cell reads | What happened |
|---|---|
#ERR Not connected | No API key saved. Open the side panel and connect your account. |
#ERR Replace <name> with a cell or value | A preview formula was copied as-is. Swap the placeholder for a cell reference. |
#ERR No "x" in countrylookup | An option name this source does not take. The message lists the ones it does. |
#ERR No data point "…" | The "field" path is not in the response. Check it against the table above. |
#PREMIUM(field) | The field exists but your plan does not include it. |
#ERR Out of credits | The cycle's credits are spent. Usage resets on your billing date. |
Before the formula works
The add-in reads the API key you saved once in the side panel — the key never goes in the formula, so a shared sheet does not leak it and a collaborator without access simply sees the last calculated values.
- Install the add-in for Google Sheets or Excel.
- Open the side panel and sign in, or paste a key from your dashboard.
- Type the formula above into any cell.
Use cases
- 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.
Other ways to use Country Lookup
Set up Country Lookup on VerveSheets, or reach the same source a different way. Your VerveSheets account and credits work on all of them — one key, one balance.
Related
More in Geography: