{"openapi":"3.1.0","info":{"title":"Municipios ES","version":"0.1.0","description":"The 8,132 municipalities of Spain from the INE list at 1 January 2026: lookup by INE code (5 digits, or 6 with the check digit, which is verified), accent-insensitive search by name, and every province and autonomous community. Names come in the INE form (\"Coruña, A\") and the usual form (\"A Coruña\"). Data: INE, CC BY 4.0; every response carries its source. Paid routes need a LicenRoute licence (Authorization: Bearer bgat_…)."},"components":{"securitySchemes":{"licence":{"type":"http","scheme":"bearer","description":"LicenRoute licence key (bgat_…)"}}},"paths":{"/v1/places":{"get":{"summary":"Autonomous communities, provinces and the number of municipalities","security":[{"licence":[]}],"parameters":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid code, province or search text; the body says which."},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."},"404":{"description":"No municipality or province with that code."}}}},"/v1/places/municipality/{code}":{"get":{"summary":"A municipality by its INE code, with its province and community","security":[{"licence":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","example":"28079"},"description":"5 digits (province + municipality) or 6 with the INE check digit"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid code, province or search text; the body says which."},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."},"404":{"description":"No municipality or province with that code."}}}},"/v1/places/search/{name}":{"get":{"summary":"Municipalities whose name matches, best matches first (at most 20)","security":[{"licence":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","example":"coruna"},"description":"At least 2 letters; accents and case are ignored"},{"name":"province","in":"query","required":false,"schema":{"type":"string","example":"15"},"description":"Province code to search only there"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid code, province or search text; the body says which."},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."},"404":{"description":"No municipality or province with that code."}}}},"/v1/places/province/{code}":{"get":{"summary":"A province, its community and all its municipalities","security":[{"licence":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","example":"28"},"description":"2-digit province code (see /v1/places)"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid code, province or search text; the body says which."},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."},"404":{"description":"No municipality or province with that code."}}}},"/health":{"get":{"summary":"Health check (free)","responses":{"200":{"description":"OK"}}}}}}