Documentation geo.api.gouv.fr

Interrogez les référentiels géographiques plus facilement.

Découvrez l’API

Recherche par code postal

Recherche par nom

Recherche géographique

Recherche avancée

Recherche par code postal

Il est possible de rechercher une commune avec son code postal.

[
   {
      "nom":"Versailles",
      "code":"78646",
      "codeDepartement":"78",
      "codeRegion":"11",
      "codesPostaux":[
         "78000"
      ],
      "population":85272,
      "_score":1
   }
]

Recherche par nom

La variable nom vous permet d’effectuer une recherche de communes par nom.

Bon à savoir

Il est possible d’utiliser la recherche par nom pour faire de l’autocomplétion.
[
   {
      "nom":"Versailles",
      "code":"78646",
      "codeDepartement":"78",
      "codeRegion":"11",
      "codesPostaux":[
         "78000"
      ],
      "population":85272,
      "_score":1
   }
]

Essayez-moi

Recherche géographique

Les variables lon et lat permettent d’effectuer une recherche géographique.

{
   "nom":"Versailles",
   "code":"78646",
   "codeDepartement":"78",
   "codeRegion":"11",
   "codesPostaux":[
      "78000"
   ],
   "population":85272
}

Essayez-moi

Chargement…

Recherche avancée

Le paramètre fields vous permet de filtrer les informations.

Champs possibles :
  • code
  • codeDepartement
  • codeRegion
  • nom
  • codesPostaux
  • surface
  • population
  • centre (géométrie)
  • contour (géométrie)
  • departement
  • region

Bon à savoir

Le paramètre format permet de préciser un format de sortie des données (json/geojson).

Attention

Le format GeoJSON implique de choisir une géométrie principale. Par défaut il s’agit du centre. Cela peut être changé en ajoutant le paramètre geometry=contour.
[
   {
      "code":"78646",
      "nom":"Versailles",
      "codesPostaux":[
         "78000"
      ],
      "surface":2616,
      "population":85272,
      "centre":{
         "type":"Point",
         "coordinates":[
            2.1305745918934593,
            48.80189489463631
         ]
      },
      "contour":{
         "type":"Polygon",
         "coordinates":[
            [
               [
                  2.070024111302563,
                  48.789875614378374
               ],
               [
                  2.0702395273076943,
                  48.78980548244647
               ],
               [
                  2.0735245764701915,
                  48.79871529974281
               ],
               [
                  2.074167590550564,
                  48.80063387531821
               ],
               [
                  2.0740153261099055,
                  48.80094398607573
               ],
               [
                  2.074075333570885,
                  48.801070491306376
               ],
               [
                  2.0743665673859963,
                  48.801020492785156
               ],
               [
                  2.079470704998835,
                  48.81525687439221
               ],
               [
                  2.079851860173887,
                  48.81589087310161
               ],
               [
                  2.0822308685408206,
                  48.81735800693676
               ],
               [
                  2.0830271352086642,
                  48.81874719871089
               ],
               [
                  2.0835237238977253,
                  48.819277998686516
               ],
               [
                  2.084467853261335,
                  48.81951819950254
               ],
               [
                  2.0845752019377874,
                  48.820733204067274
               ],
               [
                  2.088829084134207,
                  48.826069660202094
               ],
               [
                  2.0886937978524185,
                  48.826246193749384
               ],
               [
                  2.089115556878313,
                  48.82644076434238
               ],
               [
                  2.092351827520882,
                  48.823410877401486
               ],
               [
                  2.0957407219302224,
                  48.825441112928516
               ],
               [
                  2.1022782114104026,
                  48.82350107109487
               ],
               [
                  2.1040159124960036,
                  48.82433380257656
               ],
               [
                  2.10540596556665,
                  48.825909507956865
               ],
               [
                  2.1065885078066646,
                  48.826642490077475
               ],
               [
                  2.11261548471088,
                  48.82860996830179
               ],
               [
                  2.1145067977100647,
                  48.820784898185245
               ],
               [
                  2.114091776048802,
                  48.82063478399735
               ],
               [
                  2.1151001349552256,
                  48.82048248092407
               ],
               [
                  2.12850856854905,
                  48.81553637191915
               ],
               [
                  2.1288829863594714,
                  48.8156259882566
               ],
               [
                  2.1290474678879936,
                  48.8159095060829
               ],
               [
                  2.129538217527708,
                  48.81578019896523
               ],
               [
                  2.1295277072388843,
                  48.815045874909494
               ],
               [
                  2.135970514288118,
                  48.814023576643784
               ],
               [
                  2.136777560739371,
                  48.818446307037476
               ],
               [
                  2.1377923875158404,
                  48.81913000933197
               ],
               [
                  2.1378762003318488,
                  48.820986764979715
               ],
               [
                  2.1400877627298227,
                  48.82426348224982
               ],
               [
                  2.1427607896892487,
                  48.82557979852887
               ],
               [
                  2.144246693000711,
                  48.82684108061184
               ],
               [
                  2.146774013221053,
                  48.82808311112124
               ],
               [
                  2.1484986887350335,
                  48.82858507148262
               ],
               [
                  2.1489513498067017,
                  48.827060783040686
               ],
               [
                  2.1514496544433666,
                  48.821377661480014
               ],
               [
                  2.1513921622651826,
                  48.82068517698998
               ],
               [
                  2.1506368587742952,
                  48.81893316270284
               ],
               [
                  2.150849579833575,
                  48.8179144927056
               ],
               [
                  2.1519925063695595,
                  48.816756914921754
               ],
               [
                  2.153184301257001,
                  48.81611837245642
               ],
               [
                  2.1546203480701944,
                  48.81598208591544
               ],
               [
                  2.1614142167324624,
                  48.812733281303586
               ],
               [
                  2.160555786646958,
                  48.81162308726559
               ],
               [
                  2.1580546972329118,
                  48.81011046970084
               ],
               [
                  2.1587246607718082,
                  48.80943356610396
               ],
               [
                  2.159004396151283,
                  48.808542905122785
               ],
               [
                  2.1603941797273447,
                  48.8073347045761
               ],
               [
                  2.1614950651080327,
                  48.805977204294436
               ],
               [
                  2.1617178472984944,
                  48.806073700733634
               ],
               [
                  2.1620272270823455,
                  48.805811485574125
               ],
               [
                  2.16176393087257,
                  48.80567398772681
               ],
               [
                  2.1620639681774656,
                  48.80527977386559
               ],
               [
                  2.1637584602979003,
                  48.803930797091176
               ],
               [
                  2.1589687330345035,
                  48.79897690110964
               ],
               [
                  2.1592987740698892,
                  48.798662576931655
               ],
               [
                  2.1620189625817314,
                  48.79873429414268
               ],
               [
                  2.163621197722487,
                  48.79616519187915
               ],
               [
                  2.163796189539833,
                  48.79418377597918
               ],
               [
                  2.16475406312729,
                  48.79366608467228
               ],
               [
                  2.1663198266675106,
                  48.79229069707958
               ],
               [
                  2.166790993034031,
                  48.79162207500828
               ],
               [
                  2.1682789624706467,
                  48.79113039715381
               ],
               [
                  2.1683503785357345,
                  48.790952201209834
               ],
               [
                  2.167693350736929,
                  48.79033741738596
               ],
               [
                  2.167438858016938,
                  48.78972907699811
               ],
               [
                  2.1675913919521816,
                  48.789109661841565
               ],
               [
                  2.1683148950820113,
                  48.78836837768072
               ],
               [
                  2.1681587678856316,
                  48.78796550512099
               ],
               [
                  2.1668060847308044,
                  48.78750616608791
               ],
               [
                  2.1664428958614352,
                  48.78710458870428
               ],
               [
                  2.16474669694196,
                  48.786511065059294
               ],
               [
                  2.1642744525970987,
                  48.78592398585245
               ],
               [
                  2.164426806869286,
                  48.78539141224289
               ],
               [
                  2.1635691852675363,
                  48.78393571377412
               ],
               [
                  2.161807319500793,
                  48.78224290957761
               ],
               [
                  2.1585818286416334,
                  48.78353541000943
               ],
               [
                  2.151885427187693,
                  48.786647017395566
               ],
               [
                  2.1517756530599734,
                  48.786378900332316
               ],
               [
                  2.1514465103398717,
                  48.78650928944951
               ],
               [
                  2.149766750590097,
                  48.78624697200647
               ],
               [
                  2.149848676944009,
                  48.78680770938598
               ],
               [
                  2.1512076483058244,
                  48.786989293675234
               ],
               [
                  2.1495688517330054,
                  48.788556407442165
               ],
               [
                  2.148110796195351,
                  48.787892707178116
               ],
               [
                  2.1477630583488683,
                  48.78964888370293
               ],
               [
                  2.1460146673113862,
                  48.79137049610139
               ],
               [
                  2.1407070612866947,
                  48.79299540965322
               ],
               [
                  2.138993524882237,
                  48.78851308431125
               ],
               [
                  2.135788964769197,
                  48.790399677315094
               ],
               [
                  2.1357293166343316,
                  48.789939887100786
               ],
               [
                  2.1339681695198154,
                  48.78868276636036
               ],
               [
                  2.13351478979592,
                  48.78775569287725
               ],
               [
                  2.1332586801084172,
                  48.78778368762226
               ],
               [
                  2.1332063083273534,
                  48.787633711364144
               ],
               [
                  2.1329086964737245,
                  48.78775616636144
               ],
               [
                  2.128544860486529,
                  48.78304886172929
               ],
               [
                  2.12447082100999,
                  48.77993661688368
               ],
               [
                  2.1177273478351615,
                  48.78059189844073
               ],
               [
                  2.1155177617308127,
                  48.77922970825322
               ],
               [
                  2.112325778031751,
                  48.78062836191477
               ],
               [
                  2.1112653168388475,
                  48.780634399695266
               ],
               [
                  2.1065803331375794,
                  48.77949490374803
               ],
               [
                  2.1055343348207503,
                  48.780694303909335
               ],
               [
                  2.103211830485188,
                  48.78008407077852
               ],
               [
                  2.1014852685091103,
                  48.78057017424799
               ],
               [
                  2.0916092801070287,
                  48.78220490828269
               ],
               [
                  2.084282890144335,
                  48.78466256207062
               ],
               [
                  2.082915833944962,
                  48.78856066873171
               ],
               [
                  2.0777343513861606,
                  48.789297096988214
               ],
               [
                  2.076691946330468,
                  48.788839308934826
               ],
               [
                  2.074365579239184,
                  48.788681109196276
               ],
               [
                  2.0699384120244577,
                  48.789129192533665
               ],
               [
                  2.070024111302563,
                  48.789875614378374
               ]
            ]
         ]
      },
      "_score":1
   }
]

Pour être informé des nouveautés, inscrivez-vous à notre newsletter :