Normatia Territorio (anterior) API
Municipios, provincias y comunidades, con sus datos técnicos y la normativa que les aplica.
Municipios, provincias y comunidades, con sus datos técnicos y la normativa que les aplica.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/normatia-com:normatia-com-territorio-anterior-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Normatia Territorio (anterior) API
version: 1.0.0
description: 'API de normativa de edificación española: el catálogo normativo, la normativa que aplica a cada territorio, el contexto de tus proyectos y consultas en lenguaje natural con sus fuentes. La documentación completa está en https://docs.normatia.com.'
contact:
name: Normatia
email: hola@normatia.com
url: https://docs.normatia.com
servers:
- url: https://api.normatia.com
description: Producción
security:
- claveApi: []
tags:
- name: Territorio (anterior)
description: Municipios, provincias y comunidades, con sus datos técnicos y la normativa que les aplica.
paths:
/api/v1/location/search:
get:
tags:
- Territorio (anterior)
summary: Buscar localización
description: Busca en todos los niveles geográficos (país, comunidad autónoma, provincia, municipio) por nombre. La búsqueda es insensible a mayúsculas y tildes. Devuelve un máximo de 50 resultados.
operationId: searchLocations
parameters:
- name: q
in: query
required: true
schema:
type: string
minLength: 1
description: Texto de búsqueda (insensible a mayúsculas y tildes)
title: Q
description: Texto de búsqueda (insensible a mayúsculas y tildes)
- name: level
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 'Filtra por nivel: country | region | province | municipality'
title: Level
description: 'Filtra por nivel: country | region | province | municipality'
- name: ancestor_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filtra por ID de geografía ancestro (ej. 'ES-41' para la provincia de Sevilla)
title: Ancestor Id
description: Filtra por ID de geografía ancestro (ej. 'ES-41' para la provincia de Sevilla)
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/LocationSearchResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Falta la clave, no es válida o está revocada.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: La organización de la clave no tiene activada la API, o la clave no tiene el permiso de la ruta (insufficient_scope).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Límite por minuto superado (con Retry-After) o cupo del mes agotado.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Error interno. Indica el X-Request-Id si escribes a soporte.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/v1/location/{geo_id}:
get:
tags:
- Territorio (anterior)
summary: Detalle de localización
description: 'Devuelve el detalle completo de una geografía: ancestros resueltos, tech_data (zona climática, nieve, sísmica, etc.) y todas las normativas aplicables resueltas a través de la jerarquía territorial.'
operationId: getLocation
parameters:
- name: geo_id
in: path
required: true
schema:
type: string
title: Geo Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/LocationDetailResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'401':
description: Falta la clave, no es válida o está revocada.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: La organización de la clave no tiene activada la API, o la clave no tiene el permiso de la ruta (insufficient_scope).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Límite por minuto superado (con Retry-After) o cupo del mes agotado.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Error interno. Indica el X-Request-Id si escribes a soporte.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
ErrorResponse:
type: object
description: 'Error de las rutas /api/v1 y /api/v2: el código va en `detail.error`.'
required:
- detail
properties:
detail:
type: object
required:
- error
properties:
error:
type: string
example: api_not_enabled
message:
type: string
request_id:
type: string
additionalProperties: true
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
LocationSearchResult:
properties:
geo_id:
type: string
title: Geo Id
description: Identificador geográfico semántico (p.ej. 'ES-41091')
name:
type: string
title: Name
description: Nombre de la localización
level:
type: string
title: Level
description: 'Nivel geográfico: country | region | province | municipality'
type: object
required:
- geo_id
- name
- level
title: LocationSearchResult
ApplicableCode:
properties:
slug:
type: string
title: Slug
description: Slug identificador de la normativa aplicable
title:
type: string
title: Title
description: Título completo de la normativa
normative_scope:
type: string
title: Normative Scope
description: 'Ámbito normativo: national | regional | municipal'
match_reason:
type: string
title: Match Reason
description: 'Motivo por el que aplica: direct (directa) | inherited (heredada del ancestro)'
type: object
required:
- slug
- title
- normative_scope
- match_reason
title: ApplicableCode
LocationDetailResponse:
properties:
geo_id:
type: string
title: Geo Id
description: Identificador geográfico semántico
name:
type: string
title: Name
description: Nombre de la localización
level:
type: string
title: Level
description: 'Nivel geográfico: country | region | province | municipality'
ancestors:
items:
$ref: '#/components/schemas/AncestorDetail'
type: array
title: Ancestors
description: Ancestros geográficos ordenados de país a padre inmediato
tech_data:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Tech Data
description: Datos técnicos de la localización (p.ej. zona climática, carga de nieve, zona sísmica)
applicable_codes:
items:
$ref: '#/components/schemas/ApplicableCode'
type: array
title: Applicable Codes
description: Normativas aplicables a esta localización (propias + heredadas de ancestros)
type: object
required:
- geo_id
- name
- level
title: LocationDetailResponse
AncestorDetail:
properties:
geo_id:
type: string
title: Geo Id
description: Identificador geográfico del ancestro
name:
type: string
title: Name
description: Nombre del ancestro
level:
type: string
title: Level
description: 'Nivel geográfico: country | region | province'
type: object
required:
- geo_id
- name
- level
title: AncestorDetail
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
LocationSearchResponse:
properties:
results:
items:
$ref: '#/components/schemas/LocationSearchResult'
type: array
title: Results
description: Lista de localizaciones encontradas (máximo 50)
type: object
required:
- results
title: LocationSearchResponse
securitySchemes:
claveApi:
type: http
scheme: bearer
description: 'La clave de API de tu organización: `Authorization: Bearer sk-normatia-...`. Se crea en normatia.com, Mi cuenta > Claves API.'