# VietLex GraphQL API # Endpoint: POST https://vietlex.vn/api/graphql # Schema: see below (SDL) # Rate limit: 60 req/min/IP # License: CC BY 4.0 # Docs: https://vietlex.vn/cho-ai/api type VBPL { id: ID! title: String loai: String soHieu: String ngayBanHanh: String nam: Int capBanHanhTen: String linhVuc: String hieuLuc: String url: String! } type VbplSearchResult { total: Int! hits: [VBPL!]! } type GoiThau { notifyNo: String! bidName: String investorName: String locations: String bidPrice: Float publicDate: String bidCloseDate: String status: String url: String! } type GoiThauSearchResult { total: Int! hits: [GoiThau!]! } type Query { vbpl(id: ID!): VBPL searchVbpl(query: String!, limit: Int = 10, loai: String, nam: Int): VbplSearchResult! goiThau(notifyNo: String!): GoiThau searchGoiThau(query: String = "", limit: Int = 10, provCode: String, status: String): GoiThauSearchResult! } ## Example queries # 1. Get 1 VBPL POST /api/graphql { "query": "{ vbpl(id:\"doc_218156\") { title soHieu ngayBanHanh url } }" } # 2. Search VBPL POST /api/graphql { "query": "query($q:String!){ searchVbpl(query:$q, limit:5, loai:\"Luật\"){ total hits { id title url } } }", "variables": { "q": "đấu thầu" } } # 3. Search gói thầu POST /api/graphql { "query": "{ searchGoiThau(query:\"y tế\", limit:5){ total hits { notifyNo bidName url } } }" }