API Reference

Geographic map data as a single API call

GET api.mapjson.com/v1/geo

Overview

mapjson returns topojson (or geojson) for any geographic layer in a single API call. The shortest possible call returns Natural Earth 110m world countries with no attached properties — the most common use case for a world map.

// Minimal call — 110m world countries, no properties
d3.json("https://api.mapjson.com/v1/geo").then(topo => {
  const countries = topojson.feature(topo, topo.objects.geo);
  // draw your map
});

// With filtering and properties
d3.json("https://api.mapjson.com/v1/geo?layer=countries&filter=europe&detail=medium&properties=name,iso2")
  .then(topo => { /* ... */ });

Endpoint

GEThttps://api.mapjson.com/v1/geo
  ?layer=countries
  &filter=world
  &detail=low
  &properties=name,iso2,capital
  &format=topojson
Parameter Default Options Description
layer countries
countries regions districts postal lakes rivers coastlines
Which geographic layer to return. All layers return polygon or line geometry. See Layers below.
filter world
world europe asia africa north-america south-america oceania antarctica {ISO2} {ISO 3166-2} {name}
Filters output to a continent, country, or region. Accepts a continent slug, ISO alpha-2 country code (FR), ISO 3166-2 region code (US-MA), or full country name (France). Use layer=regions&filter=US to get one country's regions. Use layer=districts&filter=US for all US counties, or filter=US-MA for just Massachusetts counties. Region-level filter is required for districts — continent slugs and world are not accepted.
detail auto
auto low medium high
Geometry resolution. auto (the default) serves the right level for your filter — e.g. filter=PL&layer=regions returns high (the only tier with Poland's regions) while filter=US returns low. See Detail Levels below.
properties none name, nameOfficial, iso2, iso3, isoNum, continent, subregion, areakm2, population, gdp, capital, capitalLat, capitalLng, currencies, languages, idd, demonym, flag, borders Comma-separated list of properties to attach to each feature. Only applies to the countries layer — the worker merges these from a lookup table at request time. Omit entirely for geometry-only output (smallest response). Districts and regions include gid, name, parent_gid, and iso2 by default; the properties parameter is ignored for those layers.
format topojson
topojson geojson
Output format. Topojson is smaller and faster to render. Geojson is more compatible with other tools.

Layers

countries
polygon
Sovereign countries and territories. All territories included — disputed ones carry a disputed: true property, and the 44 landlocked states carry a landlocked: true property. Supports filter, detail, properties.
regions
polygon
First-level administrative divisions — US states, French departments, German Länder, Polish voivodeships, etc. Use filter=US to get one country's regions.
districts
polygon
Second-level administrative divisions — US counties, with 5-digit FIPS codes as gid for easy data joins. Use filter=US for all US counties, or filter=US-MA for a single state. The detail parameter is ignored — districts always return at high resolution.
postal
polygon
US ZIP code areas (Census 2020 ZCTAs — polygon approximations of USPS ZIP codes), with the 5-digit code as gid. A state filter is required: filter=US-MA. Served per state at 1:500k; detail is ignored. Note: PO-box-only ZIPs have no polygon, and boundaries are census approximations. Public domain (US Census Bureau).
lakes
polygon
Major lakes and inland water bodies. Supports detail.
rivers
line
Rivers and lake centerlines. Supports detail.
coastlines
line
World coastlines. Supports detail.

Detail Levels

Value Source resolution Best for Typical file size
auto default the right tier for your filter “just works” — you don't pick a level varies
low 110m (Natural Earth) World maps, small insets, thumbnails ~100 KB
medium 50m (Natural Earth) Continent-level maps ~300 KB
high 10m (Natural Earth) or DIVA-GIS for small countries Country and regional maps ~2 MB
When filter is an ISO alpha-2 country code and detail=high, the API automatically serves a higher-resolution file for ~60 small countries and territories (Monaco, Aruba, Singapore, Martinique, etc.) that are too small for Natural Earth 10m. No change to your API call is needed.
Small nations are dropped at coarser resolutions — Cabo Verde, Comoros, and ~85 others are absent at low and first appear at medium. Rather than fail silently: /v1/catalog reports each country's minDetail (the lowest detail that includes it); a single-country request that comes back empty carries a top-level notice naming the detail to use; and a world or continent request includes a top-level omitted array of every country that only exists at a higher detail.
detail=auto (the default) uses that coverage map so you never have to pick a level: a single-country request is served at the lowest tier that actually includes it. This matters most for regions — most countries' subdivisions only exist at high (filter=PL&layer=regions → high, its 16 voivodeships), while a few large federations are coarser (US → low, CA/BR/IN/AU → medium). The response carries an X-Detail-Served header with the tier you got; pass an explicit detail to override.

Properties

Only applies to the countries layer. No properties are returned by default — pass ?properties=name,iso2 to request specific fields, keeping the response as small as possible. Regions and districts include gid, name, parent_gid, and iso2 in every response automatically; passing properties has no effect on those layers.

nameShort English name (e.g. "France")
nameOfficialFormal name (e.g. "French Republic")
iso2ISO 3166-1 alpha-2 (e.g. "FR")
iso3ISO 3166-1 alpha-3 (e.g. "FRA")
isoNumISO 3166-1 numeric (e.g. "250")
continentContinent name (e.g. "Europe")
subregionSubregion (e.g. "Western Europe")
capitalCapital city name (e.g. "Paris")
capitalLatCapital latitude
capitalLngCapital longitude
areakm2Area in km² — the standard published total area (land + inland water), so micro-states are exact (Monaco 2.02, Vatican City 0.44). Useful as a denominator for density calculations (e.g. population ÷ areakm2). A few overseas dependencies fall back to an area computed from the 10m geometry; a handful of landless disputed banks are null.
populationPopulation estimate (2019 vintage). Pair with areakm2 for density, or gdp for GDP-per-capita. null for territories without an estimate.
gdpGDP in millions of USD (2019 vintage). null where unavailable.
flagUnicode flag emoji (e.g. "🇫🇷").
bordersArray of iso2 codes of countries sharing a land border (e.g. France → ["AD","BE","DE","IT","LU","MC","ES","CH"]). Authoritative adjacency that doesn't depend on shared-arc topology — so it's complete even for countries topojson.neighbors() can't detect (France, Norway, the Netherlands, Morocco). null for island nations and territories with no land neighbours.
currenciesArray of {code, name, symbol} (ISO 4217) — most countries have one, a few have two.
languagesArray of {code, name} — official/national languages, ISO 639-3 code plus English name.
idd{root, suffixes} — international dialing prefix. Concatenate root + a suffix for a full calling code (e.g. root "+1", suffix "212" → +1-212, New York).
demonymWhat to call a person from this country, in English (e.g. "French").

currencies, languages, idd, and demonym return null for territories without an official ISO 3166-1 assignment (disputed territories, Antarctica, etc. — 249 of mapjson's 265 countries/territories have a match).

Examples

Minimal — world countries, 110m, no properties
https://api.mapjson.com/v1/geo
Europe countries with name and ISO code
https://api.mapjson.com/v1/geo?layer=countries&filter=europe&detail=medium&properties=name,iso2
France administrative regions (departments), high detail
https://api.mapjson.com/v1/geo?layer=regions&filter=FR&detail=high
USA states, medium detail
https://api.mapjson.com/v1/geo?layer=regions&filter=US&detail=medium
Poland voivodeships, high detail
https://api.mapjson.com/v1/geo?layer=regions&filter=PL&detail=high
World lakes, medium detail, as GeoJSON
https://api.mapjson.com/v1/geo?layer=lakes&detail=medium&format=geojson
Cities and capitals in Massachusetts (points)
https://api.mapjson.com/v1/points?type=city&filter=US-MA

Response

The default response is a topojson Topology object. The feature collection is always at topo.objects.geo regardless of which layer you requested. All responses include Access-Control-Allow-Origin: *.

topojson
{
  "type": "Topology",
  "objects": {
    "geo": {
      "type": "GeometryCollection",
      "geometries": [
        {
          "type": "Polygon",
          "arcs": [[0, 1, 2]],
          "properties": {
            "name": "France",
            "iso2": "FR",
            "iso3": "FRA",
            "isoNum": "250",
            "continent": "Europe",
            "capital": "Paris",
            "capitalLat": 48.8566,
            "capitalLng": 2.3515
          }
        }
        // ...
      ]
    }
  },
  "arcs": [ ... ]
}

When no properties parameter is given, each feature's properties object is empty ({}).

Format size comparison

Filtered topojson responses have unreferenced arcs pruned, making them significantly smaller than the equivalent geojson. Shared border arcs are deduplicated in topojson; geojson re-emits full floating-point coordinates for every feature independently.

Request topojson geojson
filter=FR&detail=low 765 B 2.3 KB
filter=DE&detail=high 27 KB 114 KB
filter=world&detail=low 91 KB 426 KB

Sizes are uncompressed. gzip compression narrows the gap somewhat; topojson still wins for all request types.

Identifiers

Every feature returned by the API has a stable gid property — a string key you can use to join map geometry to your own data. gid values are always present in the response, regardless of the properties parameter.

countries
ISO alpha-2 code — US, FR, DE. Matches the filter parameter values and the same codes used by virtually every external dataset.
regions
ISO 3166-2 subdivision code — US-CA, DE-BY, FR-IDF. Where Natural Earth does not carry an official ISO 3166-2 code, the HASC code is used instead (e.g. US.CA). The catalog endpoint flags which source applies.
districts
5-digit FIPS code for US counties — 06037 (Los Angeles), 36061 (Manhattan). The first two digits are the state FIPS, which maps directly to the state's ISO 3166-2 via the catalog.
postal
5-digit ZCTA code (Census ZIP Code Tabulation Area) — 02139 (Cambridge MA), 90210 (Beverly Hills). Matches the ZIP codes in your data for ~95% of use cases; parent_gid is the state's ISO 3166-2.

Hierarchy

Features below the country level carry a parent_gid property that links upward through the hierarchy. You can traverse the full tree without downloading extra geometry.

district  06037  (Los Angeles County)
  └─ region   US-CA  (California)
       └─ country  US  (United States)

The parent_gid of a region is always a country ISO alpha-2. The parent_gid of a district is always the state's ISO 3166-2.

Catalog endpoint

The catalog lists every gid in a layer with its name, parent, and all known external codes — useful for building lookup tables or crosswalks without downloading geometry.

GET /v1/catalog?layer=countries
GET /v1/catalog?layer=regions&filter=PL
GET /v1/catalog?layer=districts&filter=US
GET /v1/catalog?layer=districts&filter=US-MA

filter is required for regions, districts, and postal. Accepts the same values as /v1/geo: an ISO alpha-2 country code (US) or an ISO 3166-2 region code (US-MA) for districts. Omitting it returns an error. The countries layer ignores filter.

Returns a JSON array. Example entry for a region:

{
  "gid":        "US-CA",
  "name":       "California",
  "layer":      "regions",
  "parent_gid": "US",
  "iso2":       "US",
  "gid_source": "iso3166-2"
}

Country entries additionally carry minDetail — the lowest detail level whose geometry includes that country. Small nations that Natural Earth omits at 110m report "medium" or "high", so you can request the right detail up front instead of getting an empty response. Example country entry:

{
  "gid":        "CV",
  "name":       "Cabo Verde",
  "layer":      "countries",
  "parent_gid": null,
  "iso2":       "CV",
  "iso3":       "CPV",
  "isoNum":     "132",
  "continent":  "Africa",
  "subregion":  "Western Africa",
  "minDetail":  "medium"
}

Joining to external data

The gid is chosen to match codes your data already uses. Census, CDC, BLS, and most US federal sources use 5-digit FIPS for counties — join on gid directly. For countries, ISO alpha-2 is the most widely used identifier in web APIs and statistical databases. For states and international regions, ISO 3166-2 is used by Eurostat, NUTS crosswalks, and most administrative data sources. Where a dataset uses a different code system, use the catalog to build a translation table. Where it uses names rather than codes — Deutschland, Mass, Calif. — post them to /v1/resolve and get gids back.

Resolve

Your data rarely uses gid values. It uses names — Deutschland, Mass, Calif., Türkiye, a column of FIPS codes. /v1/resolve maps those keys to gids so you can join them to geometry. It is the only POST endpoint, because it takes a batch of keys as a JSON body.

POSThttps://api.mapjson.com/v1/resolve

Send Content-Type: application/json and a body with a keys array:

curl -X POST https://api.mapjson.com/v1/resolve \
  -H "Content-Type: application/json" \
  -d '{"keys": ["Mass", "Calif.", "N.Y."]}'
Body field Required Description
keys yes Array of the keys to resolve, 1–1000 per request. Values are coerced to strings, so a numeric FIPS column works as-is. Order is preserved: results[i] corresponds to keys[i].
context no Object of hints that bias matching — layer, country, parent (see below). Omit it entirely if you don't know what your keys are.
Context field Options Description
layer
countries regions districts postal
What the keys are. Any other value is a 400. Without it the layer is inferred.
country
{ISO2}
Restrict to one country — {"country": "US"} keeps Georgia the state rather than the country. Case-insensitive.
parent
{gid}
Restrict to one parent region — {"parent": "US-TX"} for a column of Texas counties.

Context is a bias, not a filter: a contradicted hint lowers a candidate's score rather than removing it, so a stray country name in a column of US states still resolves — with a lower confidence. Beyond three keys the resolver also derives its own consensus from the keys that matched cleanly, which is why a batch of state names disambiguates itself without any context at all.

Response

{"keys": ["Mass", "Deutschland", "Xanadu"]}, abridged:

{
  "requestId":     "3379f2cd-…",
  "indexBuiltAt":  "2026-07-14T15:50:01.140Z",
  "consensus":     { "layer": "regions", "country": "US", "anchorCount": 3 },
  "counts":        { "resolved": 1, "low_confidence": 1, "miss": 1 },
  "results": [
    {
      "key":        "Mass",
      "status":     "resolved",
      "confidence": 0.99,
      "gid":        "US-MA",
      "name":       "Massachusetts",
      "layer":      "regions",
      "parent":     "US",
      "crosswalk":  { "fipsState": "25", "postal": "MA" },
      "explanation": {
        "normalized": "mass",
        "tier":       "exact_name",
        "matched":    "mass",
        "nameType":   "alias",
        "source":     "us-states.json",
        "factors":    ["consensus_layer_match", "consensus_country_match"]
      }
    },
    { "key": "Deutschland", "status": "low_confidence", "gid": "DE", "…": "…" },
    { "key": "Xanadu", "status": "miss", "confidence": 0, "…": "…" }
  ]
}

The gid on each result is the join key for /v1/geo — that is the whole point of the call. crosswalk carries the entity's other known codes (iso2, iso3, isoNum, fips, fipsState, postal, zcta), and explanation records why the match was made, so a bad resolution is auditable rather than mysterious.

resolved
Confident single match. Use gid directly.
ambiguous
A strong match, but the runner-up is close behind. gid holds the best guess and candidates lists the top 3 with their confidences — the place to prompt a human or apply your own tie-break.
low_confidence
Best match scored below the resolution threshold. gid and candidates are still returned; treat as a suggestion, not an answer.
miss
Nothing matched. Only key, status, confidence: 0, and explanation.normalized are present — there is no gid, so guard for it.

counts tallies the statuses so you can check a batch without walking it. A malformed body — keys missing, empty, not an array, over 1000 entries, or an invalid context.layer — returns 400 with {"error": "…"}.

No key required, CORS enabled — call it straight from the browser. Clean is this endpoint with a UI: paste a column, see what resolved, download the gids. The renewable electricity example joins a real dataset by country name in one call.

Country Codes

Use these ISO alpha-2 codes with the filter parameter (e.g. filter=DE) to retrieve a specific country.

265 countries and territories

* Informal code — not officially assigned by ISO 3166-1.

ISO2 ISO3 Name
AFAFGAfghanistan
XAXAXAkrotiri *
AXALAÅland
ALALBAlbania
DZDZAAlgeria
ASASMAmerican Samoa
ADANDAndorra
AOAGOAngola
AIAIAAnguilla
AQATAAntarctica
AGATGAntigua and Barbuda
ARARGArgentina
AMARMArmenia
AWABWAruba
XHXHXAshmore and Cartier Islands *
AUAUSAustralia
ATAUTAustria
AZAZEAzerbaijan
BSBHSBahamas
BHBHRBahrain
XNXNXBajo Nuevo Bank *
BDBGDBangladesh
BBBRBBarbados
BYBLRBelarus
BEBELBelgium
BZBLZBelize
BJBENBenin
BMBMUBermuda
BTBTNBhutan
XTXTXBir Tawil *
BOBOLBolivia
BQBESBonaire, Sint Eustatius and Saba
BABIHBosnia and Herzegovina
BWBWABotswana
BRBRABrazil
XBXBXBrazilian Island *
IOIOTBritish Indian Ocean Territory
VGVGBBritish Virgin Islands
BNBRNBrunei
BGBGRBulgaria
BFBFABurkina Faso
BIBDIBurundi
CVCPVCabo Verde
KHKHMCambodia
CMCMRCameroon
CACANCanada
KYCYMCayman Islands
CFCAFCentral African Republic
TDTCDChad
CLCHLChile
CNCHNChina
CXCXRChristmas Island
XLXLXClipperton Island *
CCCCKCocos Islands
COCOLColombia
KMCOMComoros
CGCOGCongo
CKCOKCook Islands
XOXOXCoral Sea Islands *
CRCRICosta Rica
HRHRVCroatia
CUCUBCuba
CWCUWCuraçao
CYCYPCyprus
XZXZXCyprus U.N. Buffer Zone *
CZCZECzechia
DKDNKDenmark
XDXDXDhekelia *
DJDJIDjibouti
DMDMADominica
DODOMDominican Republic
CDCODDR Congo
ECECUEcuador
EGEGYEgypt
SVSLVEl Salvador
GQGNQEquatorial Guinea
ERERIEritrea
EEESTEstonia
SZSWZEswatini
ETETHEthiopia
FKFLKFalkland Islands
FOFROFaroe Islands
FJFJIFiji
FIFINFinland
FRFRAFrance
GFGUFFrench Guiana
PFPYFFrench Polynesia
TFATFFrench Southern and Antarctic Lands
GAGABGabon
GMGMBGambia
GEGEOGeorgia
DEDEUGermany
GHGHAGhana
GIGIBGibraltar
GRGRCGreece
GLGRLGreenland
GDGRDGrenada
GPGLPGuadeloupe
GUGUMGuam
GTGTMGuatemala
GGGGYGuernsey
GNGINGuinea
GWGNBGuinea-Bissau
GYGUYGuyana
HTHTIHaiti
HMHMDHeard Island and McDonald Islands
HNHNDHonduras
HKHKGHong Kong
HUHUNHungary
ISISLIceland
ININDIndia
IDIDNIndonesia
IRIRNIran
IQIRQIraq
IEIRLIreland
IMIMNIsle of Man
ILISRIsrael
ITITAItaly
CICIVIvory Coast
JMJAMJamaica
JPJPNJapan
JEJEYJersey
JOJORJordan
KZKAZKazakhstan
KEKENKenya
KIKIRKiribati
XKKosovo *
KWKWTKuwait
KGKGZKyrgyzstan
LALAOLaos
LVLVALatvia
LBLBNLebanon
LSLSOLesotho
LRLBRLiberia
LYLBYLibya
LILIELiechtenstein
LTLTULithuania
LULUXLuxembourg
MOMACMacao
MGMDGMadagascar
MWMWIMalawi
MYMYSMalaysia
MVMDVMaldives
MLMLIMali
MTMLTMalta
MHMHLMarshall Islands
MQMTQMartinique
MRMRTMauritania
MUMUSMauritius
YTMYTMayotte
MXMEXMexico
FMFSMMicronesia
MDMDAMoldova
MCMCOMonaco
MNMNGMongolia
MEMNEMontenegro
MSMSRMontserrat
MAMARMorocco
MZMOZMozambique
MMMMRMyanmar
NANAMNamibia
NRNRUNauru
NPNPLNepal
NLNLDNetherlands
NCNCLNew Caledonia
NZNZLNew Zealand
NINICNicaragua
NENERNiger
NGNGANigeria
NUNIUNiue
NFNFKNorfolk Island
KPPRKNorth Korea
MKMKDNorth Macedonia
XCXCXNorthern Cyprus *
MPMNPNorthern Mariana Islands
NONORNorway
OMOMNOman
PKPAKPakistan
PWPLWPalau
PSPSEPalestine
PAPANPanama
PGPNGPapua New Guinea
PYPRYParaguay
PEPERPeru
PHPHLPhilippines
PNPCNPitcairn Islands
PLPOLPoland
PTPRTPortugal
PRPRIPuerto Rico
QAQATQatar
REREURéunion
ROROURomania
RURUSRussia
RWRWARwanda
SHSHNSaint Helena
KNKNASaint Kitts and Nevis
LCLCASaint Lucia
PMSPMSaint Pierre and Miquelon
VCVCTSaint Vincent and the Grenadines
BLBLMSaint-Barthélemy
MFMAFSaint-Martin
WSWSMSamoa
SMSMRSan Marino
STSTPSão Tomé and Principe
SASAUSaudi Arabia
XRXRXScarborough Reef *
SNSENSenegal
RSSRBSerbia
XEXEXSerranilla Bank *
SCSYCSeychelles
XGXGXSiachen Glacier *
SLSLESierra Leone
SGSGPSingapore
SXSXMSint Maarten
SKSVKSlovakia
SISVNSlovenia
SBSLBSolomon Islands
SOSOMSomalia
XSXSXSomaliland *
ZAZAFSouth Africa
GSSGSSouth Georgia and South Sandwich Islands
KRKORSouth Korea
SSSSDSouth Sudan
XFXFXSouthern Patagonian Ice Field *
ESESPSpain
XPXPXSpratly Islands *
LKLKASri Lanka
SDSDNSudan
SRSURSuriname
SJSJMSvalbard and Jan Mayen
SESWESweden
CHCHESwitzerland
SYSYRSyria
TWTWNTaiwan
TJTJKTajikistan
TZTZATanzania
THTHAThailand
TLTLSTimor-Leste
TGTGOTogo
TKTKLTokelau
TOTONTonga
TTTTOTrinidad and Tobago
TNTUNTunisia
TRTURTürkiye
TMTKMTurkmenistan
TCTCATurks and Caicos Islands
TVTUVTuvalu
UGUGAUganda
UAUKRUkraine
AEAREUnited Arab Emirates
GBGBRUnited Kingdom
USUSAUnited States
UMUMIUnited States Minor Outlying Islands
VIVIRUnited States Virgin Islands
UYURYUruguay
UZUZBUzbekistan
VUVUTVanuatu
VAVATVatican City
VEVENVenezuela
VNVNMVietnam
WFWLFWallis and Futuna Islands
EHESHWestern Sahara
YEYEMYemen
ZMZMBZambia
ZWZWEZimbabwe

Points

Point datasets — places rather than boundaries — are served from a separate endpoint, always as GeoJSON (points have no shared geometry, so topojson and detail don't apply). Today the only type is city; more point types will follow.

GEThttps://api.mapjson.com/v1/points
  ?type=city
  &filter=world
Parameter Default Options Description
type city
city
Which point dataset to return. city covers the world's most populous cities plus every national capital — each carries a capital boolean (true for national capitals).
filter world
world {continent} {ISO2} {ISO 3166-2} {name}
Restrict to a continent, country, or region — same values as /v1/geo: a continent slug, ISO alpha-2 country code (FR), ISO 3166-2 region code (US-MA), or country name (France). Every point is pre-tagged with its country and admin1 region, so filter=US-MA returns only the points in Massachusetts.
format geojson
geojson
Points are GeoJSON only.

Each feature carries name, countryIso2, countryName, continent, region (the admin-1 gid, always matching the regions layer: ISO 3166-2 where Natural Earth carries it, e.g. US-MA; Natural Earth's placeholder codes elsewhere, e.g. Kosovo's XK-X20; null only for Hargeysa — Natural Earth has no usable coding for Somaliland), popMetro, and capital (true for national capitals, false otherwise). popMetro is the metropolitan / urban-agglomeration population (e.g. Tokyo ≈ 35.7M for Greater Tokyo, not the ~9M city proper).

Sample response

GET /v1/points?type=city&filter=FR — a standard GeoJSON FeatureCollection of Point features:

geojson
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Point", "coordinates": [2.353, 48.8581] },
      "properties": {
        "name": "Paris",
        "nameLocal": null,
        "countryIso2": "FR",
        "countryName": "France",
        "continent": "Europe",
        "region": "FR-75",
        "popMetro": 9904000,
        "capital": true
      }
    }
    // ...
  ]
}

Every city carries capitaltrue for national capitals, false otherwise. coordinates are [longitude, latitude], per GeoJSON.

Sources

Every dataset mapjson serves is open and free to use. Attribution by area:

Natural EarthPublic-domain vector geometry for the countries, regions, districts and physical layers (110m / 50m / 10m); most country attributes (name, ISO codes, continent, subregion, capital, population, gdp); and the city / capital points, including popMetro.
DIVA-GISHigher-resolution boundaries for the ~60 small countries and territories Natural Earth 10m is too coarse for (Monaco, Aruba, Martinique…), and Western Sahara's admin-1 subdivisions.
mledoze/countriesPublic-domain country attributes: areakm2, currencies, languages, idd, demonym, flag, and borders.
US Census BureauPublic-domain 2020 ZCTA boundaries for the postal (US ZIP code) layer.