Dữ liệu Đấu thầu & Mua sắm công (/v1/bidding/*)
Phân hệ Đấu thầu & Mua sắm công (bidding-vn) cung cấp dữ liệu chuẩn hóa về Thông báo mời thầu (TBMT), Kế hoạch lựa chọn nhà thầu (KHLCNT), Kết quả lựa chọn nhà thầu (KQLCNT), bảng khối lượng mời thầu (BoQ), lịch sử điều chỉnh/gia hạn và thống kê Chủ đầu tư / Nhà thầu trúng thầu.
Mọi endpoint đều hoạt động với khóa API có quyền mặc định read. Bạn có thể tra cứu trực quan tại trang Đấu thầu Công hoặc chạy thử trên Playground.
1. Danh sách Endpoint
| Endpoint | Chi phí | Công dụng |
|---|---|---|
GET /v1/bidding/packages | 1 đơn vị | Liệt kê gói thầu phân trang cursor theo từ khóa, lĩnh vực, hình thức, loại thông báo, tỉnh/thành, chủ đầu tư, khoảng giá gói thầu, trạng thái và thời điểm đóng thầu. |
GET /v1/bidding/packages/{tbmt_code} | 1 đơn vị | Chi tiết gói thầu (award, items BoQ, units, relations). Hỗ trợ UUID, natural key (vn:bid:tbmt:2026:...), hoặc mã TBMT/KHLCNT (IB2600123456). |
GET /v1/bidding/packages/{tbmt_code}/history | 1 đơn vị | Lịch sử các phiên bản cập nhật và sự kiện biến động (deadline_extended, budget_adjusted, items_amended, award_published, status_cancelled, corrigendum). |
GET / POST /v1/bidding/search | 1 đv (fts) / 2 đv (semantic/hybrid) | Tìm kiếm sâu ở cấp độ từng mục thông tin, bảng khối lượng BoQ và kết quả trúng thầu (GET mặc định fts, POST mặc định hybrid). |
GET /v1/bidding/investors | 1 đơn vị | Thống kê tổng hợp theo Chủ đầu tư (số gói, tổng dự toán, số gói đã trao) và Nhà thầu trúng thầu. |
2. Bảng từ vựng chuẩn (Vocabularies)
category(procurement_category):goods(Hàng hóa),works(Xây lắp),consulting(Tư vấn),non_consulting(Phi tư vấn),mixed(Hỗn hợp)selection_method:open_bidding(Đấu thầu rộng rãi),competitive_shopping(Chào hàng cạnh tranh),direct_contracting(Chỉ định thầu),shortlist(Đấu thầu hạn chế)status(bid_status):upcoming(Sắp mời thầu),open(Đang mời thầu),closed(Đã đóng thầu),awarded(Đã có kết quả trúng thầu),cancelled(Đã hủy thầu)notice_type:tbmt,khlcnt,kqlcntsort(tại/packages):-submission_deadline(mặc định),submission_deadline,-budget_vnd,budget_vnd
3. Lọc & Tìm kiếm Gói thầu
curl "https://api.crawlpipe.com/v1/bidding/packages?category=goods&status=open&province_code=tp-hcm&limit=10" \
-H "Authorization: Bearer cp_live_a1b2c3d4e5f6…"import requests
resp = requests.get(
"https://api.crawlpipe.com/v1/bidding/packages",
params={
"category": "goods",
"status": "open",
"province_code": "tp-hcm",
"limit": 10,
},
headers={"Authorization": "Bearer cp_live_a1b2c3d4e5f6…"},
)
for pkg in resp.json()["data"]["packages"]:
print(pkg["tbmt_code"], pkg["package_name"], pkg["budget_vnd"])const params = new URLSearchParams({
category: "goods",
status: "open",
province_code: "tp-hcm",
limit: "10",
});
const res = await fetch(`https://api.crawlpipe.com/v1/bidding/packages?${params}`, {
headers: { Authorization: "Bearer cp_live_a1b2c3d4e5f6…" },
});
const { data, meta } = await res.json();
console.log(data.packages, meta.pagination);Các trường dữ liệu gói thầu trả về
- Tóm tắt gói thầu:
id,natural_key,tbmt_code,tbmt_code_norm,khlcnt_code,notice_type,package_name,project_name,investor_name,investor_norm,procuring_entity_name,procurement_category,selection_method,budget_vnd,funding_source,province_code,submission_deadline,opening_time,bid_status,winning_bidder_name,winning_bid_vnd,has_body,source({key, url}),last_changed_at. - Chi tiết mở rộng (
include=items,units,relations):award({winning_bidder_name, winning_bid_vnd}),items[](bảng khối lượng mời thầu),revision({id, seq, created_at, parser_version}),units[](các mục cấu trúc) vàrelations({out[], in[]}liên kết giữa TBMT ↔ KHLCNT ↔ KQLCNT).
4. Thống kê Chủ đầu tư & Nhà thầu trúng thầu (GET /v1/bidding/investors)
Truyền role ("investor", "bidder", hoặc "both") cùng tùy chọn q và province_code để lấy bảng tổng hợp theo đơn vị mời thầu hoặc nhà thầu trúng thầu:
curl "https://api.crawlpipe.com/v1/bidding/investors?role=both&province_code=ha-noi&limit=10" \
-H "Authorization: Bearer cp_live_a1b2c3d4e5f6…"import requests
resp = requests.get(
"https://api.crawlpipe.com/v1/bidding/investors",
params={"role": "both", "province_code": "ha-noi", "limit": 10},
headers={"Authorization": "Bearer cp_live_a1b2c3d4e5f6…"},
)
data = resp.json()["data"]
print(data["investors"][:3], data["winning_bidders"][:3])const res = await fetch(
"https://api.crawlpipe.com/v1/bidding/investors?role=both&province_code=ha-noi&limit=10",
{ headers: { Authorization: "Bearer cp_live_a1b2c3d4e5f6…" } },
);
const { data } = await res.json();
console.log(data.investors, data.winning_bidders);