Vietnamese Legal Document (full text) API
Get a Vietnamese legal document by id: all attributes, validity and effective dates, related documents (amends, replaces, guides) and the text or HTML.
Pass the id from /v1/vn-law-search or /v1/vn-law-lookup to get the full record: number, title, type, status, inForce, agency, signer, issue / effective / expiry / gazette dates, scope, sector and field, plus relations — the documents it is based on, amends, replaces or guides, and those that amend, replace or guide it, in both directions, each with its own status.
content=text adds the text as plain text with line breaks kept and table cells separated by tabs, ideal for LLM / RAG pipelines; content=html returns clean HTML with absolute links; relations=0 skips the relation tree. hasContent: false means only a PDF exists on vbpl.vn and content is null. For a list of up to 20 documents without text, pass ids=1,2,3.
Data: national legal database vbpl.vn (Ministry of Justice), refreshed nightly; part of the metadata 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 | |
|---|---|---|---|---|---|
id | path | string | yes | Numeric document id from vn-law-search / vn-law-lookup (path or ?id=). | |
content | query | string | no | none | none, text (plain text) or html. |
relations | query | boolean | no | true | 0 to skip related documents. |
ids | query | string | no | Up to 20 ids (comma-separated) for a list of attributes without text. |
Example
curl "https://apibox.io.vn/v1/vn-law-document/179252?relations=0" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/vn-law-document/179252?relations=0', {
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-document/179252?relations=0",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-law-document/179252?relations=0');
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
{
"id": "179252",
"title": "Luật Bảo vệ dữ liệu cá nhân số 91/2025/QH15",
"number": "91/2025/QH15",
"type": "Luật",
"status": "Còn hiệu lực",
"agency": "Quốc hội",
"issuedDate": "26/06/2025",
"effectiveDate": "01/01/2026",
"expiryDate": null,
"gazetteDate": null,
"scope": "Trung ương",
"sector": null,
"field": "Chưa phân loại",
"signerTitle": "Chủ tịch Quốc hội",
"signer": "Trần Thanh Mẫn",
"collectedFrom": null,
"applicability": null,
"inForce": true,
"url": "https://thuvienphapluat.io.vn/van-ban/179252/luat-bao-ve-du-lieu-ca-nhan-so-91-2025-qh15",
"hasContent": true,
"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
- Show the full text of a regulation inside your app
- Chunk legal texts for an LLM / RAG knowledge base
- Follow the amendment chain to the current version of a rule
- Alert users when a document they rely on is replaced
FAQ
Which content format should I use for AI?
content=text: plain text with line breaks and tab-separated table cells, without HTML noise.
What are relations?
The links between documents (based on, amends, replaces, guides, and the reverse), each with number, title, status and whether the library has it.
Why is content null?
Some documents exist only as scanned PDFs on vbpl.vn (hasContent: false). The attributes and relations are still returned.
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.