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.
openapi: 3.2.0
info:
title: Lexbase API — legislação portuguesa consolidada Diploma API
version: 1.0.0
description: Read-only HTTP API over Portuguese consolidated legislation. Every content response carries a verifiable citation (diploma + article) and its in-force status. The same corpus is exposed as an MCP server at https://api.lexbase.pt/mcp. Legal information — not legal advice.
contact:
name: Lexbase
url: https://lexbase.pt
servers:
- url: https://api.lexbase.pt
description: Production
security:
- bearerAuth: []
tags:
- name: Diploma
paths:
/diploma/{diploma_id}:
get:
summary: Diploma metadata, article tree, or full consolidated text
parameters:
- name: diploma_id
in: path
required: true
schema:
type: string
- name: render
in: query
schema:
type: string
enum:
- meta
- tree
- full
default: meta
responses:
'200':
description: Diploma view
'404':
description: Not found
tags:
- Diploma
operationId: getDiplomaByDiplomaId
x-operation-id-source: derived
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: A Lexbase API key (lx_… / leis_…) in the Authorization header. Create one at https://lexbase.pt/mcp.