Skip to main content
Some geographical entities appear in this database at two levels simultaneously — as an independent ISO 3166-1 country and as an ISO 3166-2 subdivision of a parent country. This is not a bug; it reflects how the ISO standard itself models these territories.

Why Dual Modeling Exists

A handful of overseas or autonomous territories are listed by ISO 3166 at both levels:
  • ISO 3166-1 assigns them their own two-letter country code (e.g. MQ for Martinique).
  • ISO 3166-2 also lists them as subdivisions of a parent state (e.g. FR-MQ as a subdivision of France).
Martinique is an integral region of the French Republic — its residents vote in French national elections, use the euro, and are EU citizens — but it also has its own TLD (.mq), its own ISO codes, and independent representation in certain international contexts. Both representations are kept in sync. Neither is canonical; both are first-class.

The 12 French Overseas Territories

Other Dual-Modeled Territories

The same pattern applies to territories of other countries:

How to Query

Pick the model that matches the question being asked.

Everything in France (metropolitan + all overseas territories)

Use the FR country and traverse via state_id:

Only Martinique (the territory in isolation)

Filter by the territory’s own ISO 3166-1 code:

Metropolitan France only (exclude overseas)

Exclude the 12 overseas codes explicitly:
The five DROM territories (French Guiana, Guadeloupe, Martinique, Réunion, Mayotte) currently use INSEE numeric codes (971976) as their state_code, while the overseas collectivities use ISO 3166-2 alphabetic codes. A future update will align all to ISO 3166-2 alphabetic format.

JavaScript

Impact on API Responses

When you query /v1/countries, both MQ (Martinique) and FR (France) appear as separate entries. Both return valid states and cities. This is intentional — it ensures that code doing country_code === 'MQ' continues to work correctly.
If you are building country pickers or dropdowns, you may want to filter out the overseas territories from the top-level country list to avoid showing both “France” and “Martinique” as separate country options. Use the region/subregion fields or an explicit exclusion list.

City Types

How the cities.type field works and how to filter to genuine settlements.

Database Schema

Full table definitions including level and parent_id fields on states and cities.