# Greeneris French Communes Lookup

> Greeneris French Communes Lookup is a paid API for AI agents from data.greeneris.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Looks up French communes (municipalities) by postal code, coordinates, name, or INSEE code, returning administrative and demographic data.

## Facts

- Endpoint: GET https://data.greeneris.io/v1/fr/communes
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/greeneris-french-communes-lookup-adf3b922
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GEpYq6gv2-j-7ObTXcOcf

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability greeneris-french-communes-lookup-adf3b922
```

Example prompt: What communes are in postal code 31700 in France? I need the INSEE codes, population, département, and region for each one.

## When to prefer this

Use this endpoint when you need authoritative French administrative geography data — mapping postal codes to communes, resolving coordinates to a municipality, or enriching addresses with INSEE codes, population, and administrative hierarchy (département, region, EPCI). Prefer this over generic geocoding when you specifically need INSEE codes or official French administrative identifiers required for business registration, tax filings, or French regulatory workflows.

## Known failure modes

- No matching commune found for the given parameters — returns empty communes array
- Invalid or malformed postal code / INSEE code — may return no results
- Coordinates outside France — no commune returned
- HTTP 402 returned if payment has not been made via x402 protocol before the call
- Ambiguous name query returns multiple results — caller must filter

## How this service works

Official French administrative reference from geo.api.gouv.fr (INSEE/IGN data). Look up communes by ?cp=31700 (postal code), ?code=31056 (INSEE), ?nom=Blagnac (fuzzy name) or ?lat=43.63&lon=1.37 (commune containing a point). Returns up to 20 communes with name, INSEE code, population, postal codes, departement, region and EPCI. The postal-to-INSEE mapping is the pivot key for joining French territorial datasets. Cached 7 days.

## Output

A JSON object with a count of matching communes and a list of commune records, each containing: commune name, INSEE code, list of postal codes, population, département (name and code), region (name and code), and EPCI intercommunality (name and code). The source attribution to geo.api.gouv.fr / Etalab is included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "cp": {
       "type": "string",
       "description": "5-digit postal code, e.g. 31700"
      },
      "lat": {
       "type": "number",
       "description": "Latitude (with lon: commune containing the point)"
      },
      "lon": {
       "type": "number",
       "description": "Longitude (with lat)"
      },
      "nom": {
       "type": "string",
       "description": "Commune name, fuzzy search"
      },
      "code": {
       "type": "string",
       "description": "5-character INSEE commune code, e.g. 31056"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "source": "geo.api.gouv.fr decoupage administratif (Etalab, INSEE/IGN data, Licence Ouverte 2.0)",
  "communes": [
   {
    "epci": {
     "nom": "Toulouse Métropole",
     "code": "243100518"
    },
    "name": "Beauzelle",
    "region": {
     "nom": "Occitanie",
     "code": "76"
    },
    "insee_code": "31056",
    "population": 8713,
    "departement": {
     "nom": "Haute-Garonne",
     "code": "31"
    },
    "postal_codes": [
     "31700"
    ]
   },
   {
    "epci": {
     "nom": "Toulouse Métropole",
     "code": "243100518"
    },
    "name": "Blagnac",
    "region": {
     "nom": "Occitanie",
     "code": "76"
    },
    "insee_code": "31069",
    "population": 27604,
    "departement": {
     "nom": "Haute-Garonne",
     "code": "31"
    },
    "postal_codes": [
     "31700"
    ]
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/greeneris-french-communes-lookup-adf3b922/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data.greeneris.io](https://www.zero.xyz/host/data.greeneris.io/llms.txt)
