API công khai vi.money
REST API JSON miễn phí — không cần API key, CORS open. Truy xuất số liệu tài chính VN và tính toán qua HTTP. Phù hợp cho blog/app của bạn nhúng dữ liệu.
CORS open
Mọi origin GET được. Build website tĩnh nhúng số liệu vi.money mà không cần proxy.
No auth
Read-only public, không cần API key. Khuyến nghị cache phía client. Quá 100 req/phút có thể bị throttle ở edge.
Stable v1
JSON envelope { ok, data, meta }. Breaking change sẽ tăng version (/api/v2). v1 ổn định ít nhất 12 tháng kể từ thông báo.
Discovery
GET /api/v1cache 1hLiệt kê tất cả endpoint của API v1.
curl https://vi.money/api/v1
Calculators
GET /api/v1/calculatorscache 1hDanh sách 14 công cụ + meta (slug, title, category, formulaUpdatedAt).
curl https://vi.money/api/v1/calculatorsGET /api/v1/calculators/{slug}cache 1hChi tiết 1 calc: defaults, variants, sources.
curl https://vi.money/api/v1/calculators/luong-gross-netPOST /api/v1/calculators/{slug}/computecache 600sTính kết quả. Body JSON theo input schema của calc — fields thiếu lấy từ defaults.
curl -X POST https://vi.money/api/v1/calculators/luong-gross-net/compute \ -H "Content-Type: application/json" \ -d '{"grossVnd": 30000000, "dependents": 1, "region": "I"}'
Articles
GET /api/v1/articlescache 1hDanh sách bài viết long-form + meta (slug, title, lede, readingMinutes).
curl https://vi.money/api/v1/articles
Reference data
GET /api/v1/data/cpicache 6hCPI Việt Nam 24+ tháng theo Tổng cục Thống kê (yoyChangePct, momChangePct).
curl https://vi.money/api/v1/data/cpiGET /api/v1/data/vn-indexcache 6hVN-Index đóng cửa 39 tháng + stats (MoM, YoY, CAGR 3 năm, đỉnh-đáy).
curl https://vi.money/api/v1/data/vn-indexGET /api/v1/data/salary-by-industrycache 24hLương theo 14 ngành Q1/2026 (Junior/Mid/Senior/Lead).
curl https://vi.money/api/v1/data/salary-by-industryGET /api/v1/data/tax-calendarcache 24h19 hạn nộp thuế 2026 (VAT/TNCN/TNDN/môn bài) + 3 hạn sắp tới.
curl https://vi.money/api/v1/data/tax-calendar
Response envelope
Mọi response có format thống nhất, parse JSON một lần là dùng được. Lỗi 4xx/5xx vẫn trả JSON với { ok: false, error }.
{
"ok": true,
"data": [ /* mảng hoặc object */ ],
"meta": {
"count": 14,
"version": "v1",
"sourceLabel": "Tổng cục Thống kê (gso.gov.vn)"
}
}
// Lỗi:
{
"ok": false,
"error": "Validation failed: grossVnd: Expected number, received string"
}Embed iframe (alt cho API)
Không muốn build UI? Nhúng iframe có sẵn. Mỗi calc có route /embed/{slug} render Tool standalone (không Header/Footer/Ads). Tham số input qua query string giống calc page.
<iframe
src="https://vi.money/embed/luong-gross-net?grossVnd=30000000®ion=I"
width="100%"
height="640"
loading="lazy"
title="Tính lương Gross-Net — vi.money"
style="border:1px solid #e5e7eb;border-radius:12px;"
></iframe>Tự generate snippet bằng nút "Nhúng công cụ" ở bất kỳ trang calc nào — đã điền sẵn input hiện tại của bạn.
Điều khoản sử dụng API
- License CC-BY-4.0: free để commercial-use, yêu cầu credit "Nguồn: vi.money" + link href về vi.money trên trang sử dụng data.
- Rate limit: read-only, public. Không enforce cứng nhưng abuse (> 1000 req/phút) sẽ bị block ở edge.
- Không SLA: best-effort. Đừng dùng vào hệ thống critical (vd auto-trade cổ phiếu) mà không có fallback.
- Số liệu live (CPI, VN-Index) cập nhật cuối tháng. Số liệu calc (công thức) cập nhật khi luật thay đổi — xem Phương pháp luận.