Bỏ qua đến nội dung

Tài liệu API dữ liệu đấu thầu

Hướng dẫn xác thực, phân trang, hạn mức và bộ lọc API dữ liệu đấu thầu dành cho gói VIP.

Quản lý khoá API

Xác thực và hạn mức

Đặt khoá vào biến môi trường DAUTHAU_API_KEY và gửi qua tiêu đề Authorization: Bearer <khoá>. API không dùng cookie đăng nhập. Khoá chỉ hiển thị một lần khi tạo; không đưa vào URL, mã nguồn hoặc nhật ký.

Mỗi tài khoản VIP (kể cả thành viên nhóm VIP) có tối đa 3 khoá hoạt động. Hạn mức 10.000 lượt/ngày tính chung mọi khoá, đặt lại lúc 0:00 giờ Việt Nam; mỗi khoá tối đa 10 lượt trong một cửa sổ một giây.

X-RateLimit-Limit và X-RateLimit-Remaining cho biết hạn mức và số lượt còn lại trong ngày. Phản hồi 429 kèm Retry-After tính bằng giây. Phản hồi không được lưu vào bộ nhớ đệm.

Phân trang và bộ lọc

page bắt đầu từ 1, tối đa 500. pageSize mặc định 20, tối đa 50. Danh sách trả items, page, pageSize, total. Khi có totalCapped: true, total chỉ là cận dưới; hãy thu hẹp bộ lọc.

Dùng ngày YYYY-MM-DD, giá bằng đồng Việt Nam, và mã tỉnh hoặc danh mục theo web. Có thể truyền nhiều mã danh mục bằng dấu phẩy, ví dụ linhVuc=HH,XL. filterSlug và rangeSlug nhận phần bộ lọc của URL web, ví dụ filterSlug=hang-hoa-ha-noi&rangeSlug=7-ngay-gan-day.

Sắp xếp bằng sort=newest, sort=approved hoặc sort=close (chỉ nhóm thông báo). closeWithin nhận 48 hoặc 72 giờ; các bộ lọc bật/tắt dùng true hoặc false.

{
  "items": [
    {
      "code": "IB2600000001",
      "name": "Gói thầu mẫu"
    }
  ],
  "page": 1,
  "pageSize": 20,
  "total": 1,
  "totalCapped": false
}

Endpoint GET

Chi tiết trả item. Lấy mã từ trường code trong danh sách, riêng giá trúng thầu dùng id. Các mã và trường trong ví dụ dưới đây chỉ để minh hoạ.

Chi tiết thông báo hỗ trợ tab theo danh sách item.tabs: general, lots, documents, clarifications, petitions, opening, award, history. API che thông tin liên hệ riêng tư và không trả phân tích đối thủ hoặc mức giảm giá tham khảo.

Thông báo mời thầu

Danh sách: GET /api/v1/thong-bao-moi-thau

Bộ lọc: keyword (hoặc q), sort, fromPrice, toPrice, fromDate, toDate, filterSlug, rangeSlug, linhVuc, provinceCode, isInternet, isDomestic, processApplyCode, status, bidForm, bidMode, contractType, funding, procuringEntity, closeWithin.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/thong-bao-moi-thau?keyword=m%C3%A1y+t%C3%ADnh&linhVuc=HH"

Chi tiết: GET /api/v1/thong-bao-moi-thau/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/thong-bao-moi-thau/IB2600000001"
{
  "item": {
    "row": {
      "code": "IB2600000001"
    },
    "content": {
      "tab": "general"
    }
  }
}

Kết quả mở thầu

Danh sách: GET /api/v1/ket-qua-mo-thau

Bộ lọc: keyword (hoặc q), sort, fromPrice, toPrice, fromDate, toDate, filterSlug, rangeSlug, linhVuc, provinceCode, isInternet, isDomestic, processApplyCode, status, bidForm, bidMode, contractType, funding, procuringEntity, closeWithin.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ket-qua-mo-thau?provinceCode=101"

Chi tiết: GET /api/v1/ket-qua-mo-thau/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ket-qua-mo-thau/IB2600000001"
{
  "item": {
    "row": {
      "code": "IB2600000001"
    },
    "content": {
      "tab": "opening"
    }
  }
}

Kết quả lựa chọn nhà thầu

Danh sách: GET /api/v1/ket-qua-lua-chon-nha-thau

Bộ lọc: keyword (hoặc q), sort, fromPrice, toPrice, fromDate, toDate, filterSlug, rangeSlug, linhVuc, provinceCode, isInternet, isDomestic, processApplyCode, status, bidForm, bidMode, contractType, funding, procuringEntity, closeWithin.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ket-qua-lua-chon-nha-thau?sort=approved&bidForm=DTRR"

Chi tiết: GET /api/v1/ket-qua-lua-chon-nha-thau/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ket-qua-lua-chon-nha-thau/IB2600000001"
{
  "item": {
    "row": {
      "code": "IB2600000001"
    },
    "content": {
      "tab": "award"
    }
  }
}

Thông báo mời sơ tuyển

Danh sách: GET /api/v1/thong-bao-moi-so-tuyen

Bộ lọc: keyword (hoặc q), sort, fromPrice, toPrice, fromDate, toDate, filterSlug, rangeSlug, linhVuc, provinceCode, isInternet, isDomestic, processApplyCode, status, bidForm, bidMode, contractType, funding, procuringEntity, closeWithin.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/thong-bao-moi-so-tuyen?isInternet=true"

Chi tiết: GET /api/v1/thong-bao-moi-so-tuyen/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/thong-bao-moi-so-tuyen/IB2600000002"
{
  "item": {
    "row": {
      "code": "IB2600000002"
    },
    "content": {
      "tab": "general"
    }
  }
}

Kết quả mở sơ tuyển

Danh sách: GET /api/v1/ket-qua-mo-so-tuyen

Bộ lọc: keyword (hoặc q), sort, fromPrice, toPrice, fromDate, toDate, filterSlug, rangeSlug, linhVuc, provinceCode, isInternet, isDomestic, processApplyCode, status, bidForm, bidMode, contractType, funding, procuringEntity, closeWithin.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ket-qua-mo-so-tuyen?sort=newest"

Chi tiết: GET /api/v1/ket-qua-mo-so-tuyen/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ket-qua-mo-so-tuyen/IB2600000002"
{
  "item": {
    "row": {
      "code": "IB2600000002"
    },
    "content": {
      "tab": "opening"
    }
  }
}

Kết quả sơ tuyển

Danh sách: GET /api/v1/ket-qua-so-tuyen

Bộ lọc: keyword (hoặc q), sort, fromPrice, toPrice, fromDate, toDate, filterSlug, rangeSlug, linhVuc, provinceCode, isInternet, isDomestic, processApplyCode, status, bidForm, bidMode, contractType, funding, procuringEntity, closeWithin.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ket-qua-so-tuyen?fromDate=2026-01-01"

Chi tiết: GET /api/v1/ket-qua-so-tuyen/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ket-qua-so-tuyen/IB2600000002"
{
  "item": {
    "row": {
      "code": "IB2600000002"
    },
    "content": {
      "tab": "award"
    }
  }
}

Kế hoạch lựa chọn nhà thầu

Danh sách: GET /api/v1/ke-hoach-lua-chon-nha-thau

Bộ lọc: keyword (hoặc q), sort, fromPrice, toPrice, fromDate, toDate, filterSlug, rangeSlug, planType.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ke-hoach-lua-chon-nha-thau?planType=DTPT"

Chi tiết: GET /api/v1/ke-hoach-lua-chon-nha-thau/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/ke-hoach-lua-chon-nha-thau/PL2600000001"
{
  "item": {
    "code": "PL2600000001"
  }
}

Dự án đầu tư phát triển

Danh sách: GET /api/v1/du-an

Bộ lọc: keyword (hoặc q), sort, fromPrice, toPrice, fromDate, toDate, filterSlug, rangeSlug, projectGroupCode, provinceCode, investmentFormCode, managementFormCode.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/du-an?projectGroupCode=NA&provinceCode=701"

Chi tiết: GET /api/v1/du-an/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/du-an/PR2600000001"
{
  "item": {
    "code": "PR2600000001"
  }
}

Tổ chức

Danh sách: GET /api/v1/to-chuc

Bộ lọc: keyword (hoặc q), province, businessType, role.

role nhận contractor, procuring-entity, investor.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/to-chuc?role=contractor&province=101"

Chi tiết: GET /api/v1/to-chuc/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/to-chuc/vn0100000000"
{
  "item": {
    "code": "vn0100000000",
    "name": "Tổ chức mẫu"
  }
}

Giá trúng thầu hàng hoá

Danh sách: GET /api/v1/gia-trung-thau

Bộ lọc: q, khu-vuc, thoi-gian, dvt, ben-moi-thau.

q cần ít nhất 2 ký tự; không nhập từ khoá thì danh sách rỗng. thoi-gian nhận 3t, 6t, 12t, 24t, tat-ca.

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/gia-trung-thau?q=m%C3%A1y+t%C3%ADnh&thoi-gian=12t"

Chi tiết: GET /api/v1/gia-trung-thau/<mã>

curl -H "Authorization: Bearer $DAUTHAU_API_KEY" \
  "https://beta.dauthau.bid/api/v1/gia-trung-thau/gia-mau-id"
{
  "item": {
    "id": "gia-mau-id",
    "name": "Máy tính",
    "price": "12500000.00"
  }
}

Mã lỗi

  • 401 INVALID_API_KEY — Thiếu khoá, khoá sai hoặc đã thu hồi.
  • 403 VIP_REQUIRED — Tài khoản không có quyền VIP.
  • 403 BANNED_USER — Tài khoản đã bị khoá.
  • 404 NOT_FOUND — Không có endpoint hoặc bản ghi tương ứng.
  • 405 METHOD_NOT_ALLOWED — Phương thức khác GET.
  • 429 DAILY_LIMIT — Hết lượt hôm nay; thử lại sau thời gian trong Retry-After.
  • 429 KEY_RATE_LIMIT — Quá 10 lượt/giây trên khoá; chờ 1 giây.
  • 500 INTERNAL_ERROR — Không xử lý được yêu cầu.
  • 503 UNAVAILABLE — Dữ liệu tạm thời không khả dụng.
{
  "error": {
    "code": "VIP_REQUIRED",
    "message": "Chỉ tài khoản có quyền VIP mới dùng được API."
  }
}