Vietnamese Legal Documents Search API
Search ~171,000 Vietnamese legal documents (laws, decrees, circulars, decisions) by keyword or number, filter by type, status, agency and year.
Full-text search over about 171,000 Vietnamese legal normative documents from the national legal database (vbpl.vn), refreshed nightly. Search with or without diacritics; a document number in q (e.g. 45/2019/QH14) is matched first. Filter by type (Luật, Nghị định, Thông tư, Quyết định…), status (Còn hiệu lực, Hết hiệu lực…), issuing agency, scope (tw central / dp local) and year_from / year_to; sort by relevance, newest or oldest; page through with page and page_size (max 50; the first 10,000 results are reachable).
Each item gives the document id, number, title, type, status, inForce (true for documents fully or partly in force), issue date (dd/mm/yyyy as published), agency and a link to the full text. Use the id with /v1/vn-law-document/{id} to get all attributes, related documents and the text (plain text for LLM / RAG pipelines, or clean HTML). facets=1 adds counts by type and status.
Data: national legal database vbpl.vn (Ministry of Justice); legal normative documents are not protected by copyright (IP Law art. 15); part of the metadata comes from the "Vietnamese Legal Documents" dataset (CC BY 4.0, attribution in every answer). Reference only: the Official Gazette text prevails.
Markdown · OpenAPI · Postman · llms.txt
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
q | query | string | no | Keywords (max 200 characters), with or without diacritics, or a document number. Empty = browse by filters. | |
type | query | string | no | Document type, e.g. Luật, Nghị định, Thông tư (with or without diacritics). | |
status | query | string | no | Validity status, e.g. Còn hiệu lực, Hết hiệu lực. | |
agency | query | string | no | Issuing agency, e.g. Bộ Tài chính, UBND tỉnh Phú Yên. | |
scope | query | string | no | tw (central) or dp (local). | |
year_from | query | number | no | Issued from this year. | |
year_to | query | number | no | Issued up to this year. | |
sort | query | string | no | relevance (default with q), newest (default without q) or oldest. | |
page | query | number | no | 1 | Page number. |
page_size | query | number | no | 20 | Results per page (1–50). |
facets | query | boolean | no | 1: add counts by type and status. |
Example
curl "https://apibox.io.vn/v1/vn-law-search?q=luật đất đai&type=Luật&page_size=1" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/vn-law-search?q=luật đất đai&type=Luật&page_size=1', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/vn-law-search?q=luật đất đai&type=Luật&page_size=1",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-law-search?q=luật đất đai&type=Luật&page_size=1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"total": 9,
"approximate": false,
"page": 1,
"pageSize": 1,
"items": [
{
"id": "177815",
"number": "31/2024/QH15",
"title": "Luật Đất đai",
"type": "Luật",
"status": "Còn hiệu lực",
"inForce": true,
"issuedDate": "18/01/2024",
"agency": "Quốc hội",
"url": "https://thuvienphapluat.io.vn/van-ban/177815/luat-dat-dai"
}
],
"source": {
"name": "Thư viện Pháp luật Mở (thuvienphapluat.io.vn)",
"texts": "National legal database vbpl.vn (Ministry of Justice); legal normative documents are not protected by copyright (IP Law art. 15)",
"metadata_licence": "Part of the metadata: \"Vietnamese Legal Documents\" dataset by Thịnh Ngô, CC BY 4.0",
"disclaimer": "Reference only; the text published in the Official Gazette (Công báo) prevails."
}
}
Use cases
- Find the laws, decrees and circulars on a topic for a legal or compliance app
- Check whether a document is still in force before citing it
- Feed an LLM / RAG assistant with the right Vietnamese legal texts
- Build a "related regulations" box for a news or accounting site
FAQ
How fresh is the data?
The library is synchronised nightly from the national legal database; new documents usually appear the next day.
Can I search without diacritics?
Yes. "luat dat dai" and "luật đất đai" give the same results; a document number in the query is matched first.
Is this an official source?
It is a reference copy of the national legal database. For legal effect, the text published in the Official Gazette prevails.
Related APIs
JSON Validator
Check JSON syntax with exact line and column of errors, and validate data against a JSON Schema (draft 4, 7, 2019-09 or 2020-12).
{ }JSON Formatter
Pretty print JSON with 0-8 spaces or tabs, minify it, or sort object keys recursively. Syntax errors are reported with line and column.
CSVCSV to JSON
Convert CSV into an array of JSON objects using the header row, with delimiter auto-detection, number and boolean typing, and row-level errors.