Normatia Normativa (anterior) API

El catálogo normativo: buscar normas y leer sus versiones y su estructura.

GitHub OpenAPI

Operations 4

GET /api/v1/codes/search Buscar normativas #
GET /api/v1/codes/{slug} Detalle de normativa #
GET /api/v1/codes/{slug}/latest Versiones vigentes de una normativa #
GET /api/v1/codes/{slug}/{version} Detalle de una versión concreta #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/normatia-com:normatia-com-normativa-anterior-api"
All apis
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.

Get an API 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 Specification

normatia-com-normativa-anterior-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Normatia Normativa (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: Normativa (anterior)
  description: 'El catálogo normativo: buscar normas y leer sus versiones y su estructura.'
paths:
  /api/v1/codes/search:
    get:
      tags:
      - Normativa (anterior)
      summary: Buscar normativas
      description: Búsqueda paginada de colecciones normativas por título, ámbito o etiqueta. Devuelve las normativas coincidentes con metadatos de paginación.
      operationId: searchCodes
      parameters:
      - name: q
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            minLength: 1
          - type: 'null'
          description: Búsqueda parcial por título
          title: Q
        description: Búsqueda parcial por título
      - name: normative_scope
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Filtra por ámbito: national | regional | municipal'
          title: Normative Scope
        description: 'Filtra por ámbito: national | regional | municipal'
      - name: tag
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filtra por etiqueta
          title: Tag
        description: Filtra por etiqueta
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Número de página (base 1)
          default: 1
          title: Page
        description: Número de página (base 1)
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          maximum: 50
          minimum: 1
          description: Resultados por página (máximo 50)
          default: 20
          title: Page Size
        description: Resultados por página (máximo 50)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCodesResponse'
        '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/codes/{slug}:
    get:
      tags:
      - Normativa (anterior)
      summary: Detalle de normativa
      description: Devuelve el detalle completo de una colección normativa, incluyendo todas sus versiones de documento. Usa los slugs de versión de la respuesta para consultar versiones específicas.
      operationId: getCode
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeDetailResponse'
        '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/codes/{slug}/latest:
    get:
      tags:
      - Normativa (anterior)
      summary: Versiones vigentes de una normativa
      description: Devuelve todos los documentos con estado vigente de una normativa. Una normativa puede tener varios documentos activos simultáneamente (p.ej. norma principal y anejos). Devuelve un array vacío si no hay versiones vigentes.
      operationId: getCodeLatest
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CodeVersionSummaryResponse'
                title: Response Get Code Latest Api V1 Codes  Slug  Latest Get
        '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/codes/{slug}/{version}:
    get:
      tags:
      - Normativa (anterior)
      summary: Detalle de una versión concreta
      description: Devuelve el detalle completo de una versión específica de una normativa, incluyendo su índice de secciones. Permite conocer la estructura de la regulación antes de realizar una consulta.
      operationId: getCodeVersion
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      - name: version
        in: path
        required: true
        schema:
          type: string
          title: Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeVersionDetailResponse'
        '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:
    CodeSummary:
      properties:
        slug:
          type: string
          title: Slug
          description: Slug identificador único de la normativa
        title:
          type: string
          title: Title
          description: Título completo de la normativa
        short_title:
          anyOf:
          - type: string
          - type: 'null'
          title: Short Title
          description: Título corto para presentación
        normative_scope:
          type: string
          title: Normative Scope
          description: 'Ámbito normativo: national | regional | municipal'
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
          description: Etiquetas de categorización
      type: object
      required:
      - slug
      - title
      - normative_scope
      title: CodeSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    PaginatedCodesResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CodeSummary'
          type: array
          title: Items
          description: Normativas de esta página
        total:
          type: integer
          title: Total
          description: Total de normativas que coinciden con el filtro
        page:
          type: integer
          title: Page
          description: Página actual (empieza en 1)
        page_size:
          type: integer
          title: Page Size
          description: Número de resultados por página
        total_pages:
          type: integer
          title: Total Pages
          description: Número total de páginas
      type: object
      required:
      - items
      - total
      - page
      - page_size
      - total_pages
      title: PaginatedCodesResponse
    CodeVersionDetailResponse:
      properties:
        slug:
          type: string
          title: Slug
          description: Slug de la colección (normativa padre)
        version:
          type: string
          title: Version
          description: Slug del documento (versión)
        title:
          type: string
          title: Title
          description: Título de esta versión
        status:
          type: string
          title: Status
          description: 'Estado del documento: active | repealed | draft | in_progress'
        published_date:
          anyOf:
          - type: string
          - type: 'null'
          title: Published Date
          description: Fecha de publicación (YYYY-MM-DD)
        effective_date:
          anyOf:
          - type: string
          - type: 'null'
          title: Effective Date
          description: Fecha de entrada en vigor (YYYY-MM-DD)
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Descripción de esta versión
        author:
          anyOf:
          - type: string
          - type: 'null'
          title: Author
          description: Organismo emisor o autor
        source_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Source Url
          description: URL de la fuente oficial
        is_internal:
          type: boolean
          title: Is Internal
          description: True si el contenido está alojado en Normatia y disponible para consulta RAG
          default: false
        sections:
          items:
            $ref: '#/components/schemas/CodeSection'
          type: array
          title: Sections
          description: Índice de secciones ordenado
      type: object
      required:
      - slug
      - version
      - title
      - status
      title: CodeVersionDetailResponse
    CodeSection:
      properties:
        slug:
          type: string
          title: Slug
          description: Slug de la sección (usado como ancla en la interfaz web)
        title:
          type: string
          title: Title
          description: Título de la sección
        order:
          type: integer
          title: Order
          description: Orden de presentación
      type: object
      required:
      - slug
      - title
      - order
      title: CodeSection
    CodeDetailResponse:
      properties:
        slug:
          type: string
          title: Slug
          description: Slug identificador único de la normativa
        title:
          type: string
          title: Title
          description: Título completo de la normativa
        short_title:
          anyOf:
          - type: string
          - type: 'null'
          title: Short Title
          description: Título corto para presentación
        normative_scope:
          type: string
          title: Normative Scope
          description: 'Ámbito normativo: national | regional | municipal'
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Descripción de la normativa
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
          description: Etiquetas de categorización
        country_code:
          type: string
          title: Country Code
          description: Código de país ISO 3166-1 alpha-2
          default: es
        documents:
          items:
            $ref: '#/components/schemas/CodeVersion'
          type: array
          title: Documents
          description: Todas las versiones de documentos de esta normativa
      type: object
      required:
      - slug
      - title
      - normative_scope
      title: CodeDetailResponse
    CodeVersionSummaryResponse:
      properties:
        slug:
          type: string
          title: Slug
          description: Slug de la colección (normativa padre)
        version:
          type: string
          title: Version
          description: Slug del documento (versión)
        title:
          type: string
          title: Title
          description: Título de esta versión
        status:
          type: string
          title: Status
          description: 'Estado del documento: active | repealed | draft | in_progress'
        published_date:
          anyOf:
          - type: string
          - type: 'null'
          title: Published Date
          description: Fecha de publicación (YYYY-MM-DD)
        effective_date:
          anyOf:
          - type: string
          - type: 'null'
          title: Effective Date
          description: Fecha de entrada en vigor (YYYY-MM-DD)
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Descripción de esta versión
        author:
          anyOf:
          - type: string
          - type: 'null'
          title: Author
          description: Organismo emisor o autor
        source_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Source Url
          description: URL de la fuente oficial
        is_internal:
          type: boolean
          title: Is Internal
          description: True si el contenido está alojado en Normatia y disponible para consulta RAG
          default: false
      type: object
      required:
      - slug
      - version
      - title
      - status
      title: CodeVersionSummaryResponse
    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
    CodeVersion:
      properties:
        version:
          type: string
          title: Version
          description: Slug del documento usado como identificador de versión
        title:
          type: string
          title: Title
          description: Título de esta versión
        status:
          type: string
          title: Status
          description: 'Estado del documento: active | repealed | draft | in_progress'
        published_date:
          anyOf:
          - type: string
          - type: 'null'
          title: Published Date
          description: Fecha de publicación (YYYY-MM-DD)
        effective_date:
          anyOf:
          - type: string
          - type: 'null'
          title: Effective Date
          description: Fecha de entrada en vigor (YYYY-MM-DD)
        is_internal:
          type: boolean
          title: Is Internal
          description: True si el contenido está alojado en Normatia y disponible para consulta RAG
          default: false
      type: object
      required:
      - version
      - title
      - status
      title: CodeVersion
  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.'