« Api gouv » : différence entre les versions
| Ligne 13 : | Ligne 13 : | ||
=== adresse.data.gouv.fr === | === adresse.data.gouv.fr === | ||
==== Démo Requete 1 ==== | |||
<syntaxhighlight lang="bash" copy> | |||
curl -s "https://api-adresse.data.gouv.fr/search/?q=clermont+ferrand&type=municipality" | jq '.features[]' | |||
</syntaxhighlight> | |||
Résultat: | |||
<syntaxhighlight lang="json" line> | |||
{ | |||
"type": "Feature", | |||
"geometry": { | |||
"type": "Point", | |||
"coordinates": [ | |||
3.107055, | |||
45.786671 | |||
] | |||
}, | |||
"properties": { | |||
"label": "Clermont-Ferrand", | |||
"score": 0.9582027272727272, | |||
"id": "63113", | |||
"banId": "e78e0f92-9838-4643-a9d2-b12da89352fc", | |||
"type": "municipality", | |||
"name": "Clermont-Ferrand", | |||
"postcode": "63000", | |||
"citycode": "63113", | |||
"x": 708317.42, | |||
"y": 6520789.22, | |||
"population": 147751, | |||
"city": "Clermont-Ferrand", | |||
"context": "63, Puy-de-Dôme, Auvergne-Rhône-Alpes", | |||
"importance": 0.54023, | |||
"municipality": "Clermont-Ferrand", | |||
"_type": "address" | |||
} | |||
} | |||
</syntaxhighlight> | |||
==== Démo Requete 2 ==== | ==== Démo Requete 2 ==== | ||