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

ISO 3166-1ISO 3166-2NameState type
GFFR-GFFrench Guianaoverseas region
PFFR-PFFrench Polynesiaoverseas collectivity
TFFR-TFFrench Southern and Antarctic Landsoverseas territory
GPFR-GPGuadeloupeoverseas region
MQFR-MQMartiniqueoverseas region
YTFR-YTMayotteoverseas region
NCFR-NCNew Caledoniaoverseas collectivity
REFR-RERéunionoverseas region
PMFR-PMSaint Pierre and Miquelonoverseas collectivity
BLFR-BLSaint-Barthélemyoverseas collectivity
MFFR-MFSaint-Martin (French part)overseas collectivity
WFFR-WFWallis and Futunaoverseas collectivity

Other Dual-Modeled Territories

The same pattern applies to territories of other countries:
ParentTerritorycountries.iso2Notes
CNHong Kong SARHKspecial administrative region
CNMacau SARMOspecial administrative region
USPuerto RicoPRoutlying area
USGuamGUoutlying area
USAmerican SamoaASoutlying area
USNorthern Mariana IslandsMPoutlying area
USU.S. Virgin IslandsVIoutlying area
NOSvalbardSJarctic region

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:
SELECT c.*
FROM cities c
JOIN states s ON c.state_id = s.id
WHERE s.country_code = 'FR';
-- includes all 12 overseas territories

Only Martinique (the territory in isolation)

Filter by the territory’s own ISO 3166-1 code:
SELECT * FROM cities WHERE country_code = 'MQ';

Metropolitan France only (exclude overseas)

Exclude the 12 overseas codes explicitly:
SELECT * FROM cities
WHERE country_code = 'FR'
  AND state_code NOT IN (
    'GF','PF','TF','GP','MQ','YT','NC','RE','PM','BL','MF','WF',
    '971','972','973','974','976'  -- INSEE codes for DROM
  );
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

import { getCitiesOfCountry } from '@countrystatecity/countries';

// All French cities including overseas territories
const allFrench = await getCitiesOfCountry('FR');

// Martinique only
const martinique = await getCitiesOfCountry('MQ');

// Metropolitan France only
const OVERSEAS = new Set(['GF','PF','TF','GP','MQ','YT','NC','RE','PM','BL','MF','WF']);
const metropolitan = allFrench.filter(c => !OVERSEAS.has(c.country_code));

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.