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.
MQfor Martinique). - ISO 3166-2 also lists them as subdivisions of a parent state (e.g.
FR-MQas a subdivision of France).
.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 theFR 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 (
971–976) 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.
Related
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.