---
title: "Search Brazilian federal legal texts."
method: GET
path: "/api/legislation/search"
---

# Search Brazilian federal legal texts.

`GET /api/legislation/search`

## Request

- Base URL: `https://okfindex.com`
- URL: `https://okfindex.com/api/legislation/search`
- Auth: none declared

Full-text search covers title, description and body. Number/year uses an exact indexed lookup. Source metadata is not a verification of legal currency. No state or municipal laws in this collection.
Returns: {items:[{id,title,description,type,year,number,authority,country:'BR',jurisdiction:'federal',uf:null,provider,source_url,lexml_url,downloaded_at,text_version,revoked,missing_text,sha256,api,url,okf_url}],next}. Up to 20 items; follow next until null. authority=unknown means the source did not identify an issuing body. UF does not apply to this federal jurisdiction.

## Query parameters

- `q` string
- `type` string
- `year` integer
- `authority` string
- `after` string

## Response `200`

{items:[{id,title,description,type,year,number,authority,country:'BR',jurisdiction:'federal',uf:null,provider,source_url,lexml_url,downloaded_at,text_version,revoked,missing_text,sha256,api,url,okf_url}],next}. Up to 20 items; follow next until null. authority=unknown means the source did not identify an issuing body. UF does not apply to this federal jurisdiction.

## Other responses

- `400`: Invalid query or part.
- `404`: Document or part not found.
- `429`: Reader busy. Retry after the stated delay.
- `503`: The corpus is unavailable. Do not treat this as no results.

---

[API](https://skmtc.dev/okfindex/apis/okf-index.md) · [All operations](https://skmtc.dev/okfindex/apis/okf-index/llms.txt) · [OpenAPI document](https://skmtc.dev/okfindex/apis/okf-index/revisions/4b13ca3c739f?raw)
