# Vietnamese Law Lookup by Number API

> Exact lookup of Vietnamese legal documents by number (e.g. 31/2024/QH15, 01/2024/QĐ-UBND): status, in-force flag, dates, agency and link.

- Endpoint: `GET | POST https://apibox.io.vn/v1/vn-law-lookup/{number}`
- Category: Data & JSON
- HTML docs: https://apibox.io.vn/docs/vn-law-lookup/ (Vietnamese: https://apibox.io.vn/vi/docs/vn-law-lookup/)
- Online tool: https://apibox.io.vn/tools/vn-law-lookup/
- Authentication: `Authorization: Bearer <API key>` or `X-API-Key: <API key>` (free key: https://apibox.io.vn/dashboard/#signup)

Give a document number such as `31/2024/QH15`, `168/2025/NĐ-CP` or `01/2024/QĐ-UBND` and get every document carrying exactly that number (case, diacritics and spaces ignored). Local numbers such as `01/2024/QĐ-UBND` are shared by many provinces, so the answer is a list with the issuing agency of each; `truncated: true` means more than 300 matches exist and you should narrow down with `/v1/vn-law-search?q=<number>&agency=…`.

Each item has the id, number, title, type, status, `inForce`, issue date, agency and link; pass the id to `/v1/vn-law-document/{id}` for the full record and text. Typical use: turn citations found in contracts, invoices or other texts (see `/v1/vn-legal-parse`) into links and validity checks.

Data: national legal database vbpl.vn (Ministry of Justice), refreshed nightly; reference only.

## Parameters

| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
| `number` | path | string | yes |  | Document number, e.g. `31/2024/QH15` (path, URL-encoded, or `?number=`). |

## Example request

```bash
curl "https://apibox.io.vn/v1/vn-law-lookup?number=31/2024/QH15" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Example response

```json
{
  "number": "31/2024/QH15",
  "total": 1,
  "truncated": false,
  "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

- Check whether a decree cited in a contract is still in force
- Turn legal citations in a text into links to the full text
- Validate the legal basis printed on invoices or forms
- Resolve the right local document when many provinces use the same number

## FAQ

### Why can one number return several documents?

Local documents restart their numbering in every province, so 01/2024/QĐ-UBND exists in many places. Each result names its agency.

### Do I need the exact format?

Case, diacritics and spaces are ignored: 31/2024/qh15 works. Use vn-law-search for partial numbers.

### How do I get the text?

Call /v1/vn-law-document/{id} with content=text or content=html.
