Read a Vietnamese Legal Document: Text, Status, Relations
Get a Vietnamese legal document by id: all attributes, validity and effective dates, related documents (amends, replaces, guides) and the text or HTML.
Result
Press “Run” to see the result.
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.
Use this in your code
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));API documentation → Get a free API key
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.