Normatia Consultas API
Preguntas en lenguaje natural sobre un proyecto, con fuentes. Gastan un crédito.
Preguntas en lenguaje natural sobre un proyecto, con fuentes. Gastan un crédito.
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-consultas-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 Consultas 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: Consultas
description: Preguntas en lenguaje natural sobre un proyecto, con fuentes. Gastan un crédito.
paths:
/api/v2/ask:
post:
tags:
- Consultas
summary: Consulta agéntica en lenguaje natural
description: 'Ejecuta el motor agéntico de Normatia sobre un proyecto: el modelo decide qué buscar en la normativa aplicable, consulta la memoria y los cálculos guardados del proyecto y responde citando las fuentes con marcadores `[N]`.
Sin `project_id` usa el proyecto activo del usuario; con él, cualquier proyecto al que tenga acceso, sin necesidad de cambiar el activo. Consume 1 crédito.'
operationId: askV2
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AskV2Request'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AskV2Response'
'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
AskV2Response:
properties:
answer:
type: string
title: Answer
sources:
items:
$ref: '#/components/schemas/AskV2Source'
type: array
title: Sources
default: []
project:
anyOf:
- $ref: '#/components/schemas/AskV2Project'
- type: 'null'
iterations:
type: integer
title: Iterations
default: 0
searches:
type: integer
title: Searches
default: 0
type: object
required:
- answer
title: AskV2Response
description: Respuesta de la consulta agéntica
AskV2Project:
properties:
project_id:
type: string
title: Project Id
geo_id:
anyOf:
- type: string
- type: 'null'
title: Geo Id
location:
anyOf:
- type: string
- type: 'null'
title: Location
type: object
required:
- project_id
title: AskV2Project
description: Proyecto contra el que se resolvió la consulta
AskV2Source:
properties:
index:
type: integer
title: Index
description: Número de la fuente, el N de las citas [N]
citation_type:
type: string
title: Citation Type
description: article, document, collection o user_document
default: ''
document_title:
type: string
title: Document Title
default: ''
section_title:
anyOf:
- type: string
- type: 'null'
title: Section Title
block_title:
anyOf:
- type: string
- type: 'null'
title: Block Title
url:
anyOf:
- type: string
- type: 'null'
title: Url
url_valid:
type: boolean
title: Url Valid
default: true
block_id:
anyOf:
- type: string
- type: 'null'
title: Block Id
type: object
required:
- index
title: AskV2Source
description: 'Fuente citada en una respuesta agéntica.
Es la misma información que `CitationSource` del chat web, en snake_case para
mantener la convención del resto de la API pública.'
AskV2Request:
properties:
query:
type: string
maxLength: 2000
minLength: 1
title: Query
description: Pregunta en lenguaje natural
project_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Project Id
description: Proyecto sobre el que consultar. Si se omite se usa el proyecto activo del usuario.
additionalProperties: false
type: object
required:
- query
title: AskV2Request
description: Request de la consulta agéntica (POST /api/v2/ask)
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
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.'