French Communes Search by Name, Postal Code or Departement (API Geo)
geoapifr/communes-search
Searches the French communes (municipalities) by name, by postal code, or by departement code, and returns for each its INSEE code, SIREN, postal codes, population, surface in hectares, centre point, departement and region. Give at least one of nom, codePostal or codeDepartement. A name search ranks by relevance and boosts populous communes (`_score` is set); results are capped at 25 (`limit`, default 10). A search that matches nothing returns an empty list. Geometry outlines are not returned.
Price
$0.0026 per call
You pay the price shown. If a call turns out to cost more than its quote, you pay the actual price, capped at twice the quote. No monthly minimum. Top-ups start at $0.50.
Data source
Data from API Geo, api.gouv.fr (DINUM, Etalab), published under the French Open Licence (Licence Ouverte). Served by Eden Engine; not an official api.gouv.fr product.
Use it
Five steps: search, inspect, learn, run, settle. No per-tool setup; your agent reaches this tool through the meta-tools it already has.
Connect once and your AI can find and run this tool, and any other it needs.
// 1. search: find the tool
omnial_search({ query: "what you need" })
// 2. inspect: price and input schema
omnial_inspect({ tool: "geoapifr/communes-search" })
// 3. learn: read the usage guide at runtime
omnial_learn({ tool: "geoapifr/communes-search" })
// 4. run: price the exact call first, then run it
omnial_execute({ tool: "geoapifr/communes-search", input: { /* see input_schema */ }, dry_run: true })
omnial_execute({ tool: "geoapifr/communes-search", input: { /* ... */ } })
// 5. settle: the call is charged when it finishes, nothing to doNot connected yet? Point your MCP client at https://mcp.eden-engine.com/mcp, then copy a config for your client.
Pricing
Every charge this tool can incur.
| Charge | Price |
|---|---|
Per call | $0.0026 |
- Updated
- Oct 25, 2026
Input and output schemas
Input schema
{
"type": "object",
"anyOf": [
{
"required": [
"nom"
]
},
{
"required": [
"codePostal"
]
},
{
"required": [
"codeDepartement"
]
}
],
"properties": {
"nom": {
"type": "string",
"maxLength": 80,
"minLength": 2,
"description": "Commune name or the start of it, 2 to 80 characters, for example Lyon or Saint-Malo."
},
"limit": {
"type": "integer",
"default": 10,
"maximum": 25,
"minimum": 1,
"description": "Maximum communes to return, 1 to 25 (default 10)."
},
"codePostal": {
"type": "string",
"pattern": "^[0-9]{5}$",
"description": "Five-digit French postal code, for example 75001."
},
"codeDepartement": {
"type": "string",
"pattern": "^([0-9]{2}|2[AB]|97[1-6])$",
"description": "Departement code: two digits, 2A or 2B for Corsica, or 971 to 976 for the overseas departements."
}
},
"additionalProperties": false
}Output schema
{
"type": "object",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"nom",
"code"
],
"properties": {
"nom": {
"type": "string",
"description": "Commune name."
},
"code": {
"type": "string",
"description": "INSEE commune code (5 characters; Corsica uses 2A or 2B as the first two)."
},
"siren": {
"type": "string",
"description": "SIREN of the commune."
},
"_score": {
"type": "number",
"description": "Relevance score of the name match; present only on name searches."
},
"centre": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Always Point."
},
"coordinates": {
"type": "array",
"items": {
"type": "number",
"description": "Longitude, then latitude (WGS84)."
},
"description": "[longitude, latitude]."
}
},
"description": "Centre point of the commune as GeoJSON.",
"additionalProperties": true
},
"region": {
"type": "object",
"properties": {
"nom": {
"type": "string",
"description": "Region name."
},
"code": {
"type": "string",
"description": "Region code."
}
},
"description": "The region of the commune.",
"additionalProperties": true
},
"surface": {
"type": "number",
"description": "Surface in hectares."
},
"codeEpci": {
"type": "string",
"description": "Code of the inter-municipal body (EPCI) the commune belongs to."
},
"population": {
"type": "number",
"description": "Municipal population."
},
"departement": {
"type": "object",
"properties": {
"nom": {
"type": "string",
"description": "Departement name."
},
"code": {
"type": "string",
"description": "Departement code."
}
},
"description": "The departement of the commune.",
"additionalProperties": true
},
"codesPostaux": {
"type": "array",
"items": {
"type": "string",
"description": "A postal code."
},
"description": "Postal codes served by the commune."
}
},
"description": "One commune.",
"additionalProperties": true
},
"description": "Matching communes, at most `limit`; empty when nothing matches."
}
},
"description": "Matching communes, at most `limit`; empty when nothing matches.",
"additionalProperties": true
}