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 Fragment 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: Fragment
paths:
/fragment/{fragment_id}:
get:
summary: A single article by its fragment id, with citation and in-force dates
parameters:
- name: fragment_id
in: path
required: true
schema:
type: string
responses:
'200':
description: Article
'404':
description: Not found
tags:
- Fragment
operationId: getFragmentByFragmentId
x-operation-id-source: derived
/fragment/{fragment_id}/amendments:
get:
summary: Amendment history of an article
parameters:
- name: fragment_id
in: path
required: true
schema:
type: string
responses:
'200':
description: Amendments
'404':
description: Not found
tags:
- Fragment
operationId: getFragmentByFragmentIdAmendments
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.