Giter Site home page Giter Site logo

dthphuong / vn-public-apis Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 395 KB

VN Public APIs là tập hợp các API miễn phí giúp bạn có thể lấy được các thông tin công khai một cách dễ dàng.

Home Page: https://vn-public-apis.fpo.vn/

JavaScript 80.89% HTML 19.11%
api provinces districts wards public vietnam

vn-public-apis's Introduction

VN Public APIs

VN Public APIs là tập hợp các API miễn phí giúp bạn có thể lấy được các thông tin công khai một cách dễ dàng.

API Reference

1. Lấy danh sách Tỉnh / Thành phố (Thành phố trực thuộc Trung ương)

  GET /provinces/getAll

Run Demo tại HTTPie với script:

http -v https://vn-public-apis.fpo.vn/provinces/getAll?limit=-1
http -v https://vn-public-apis.fpo.vn/provinces/getAll?limit=-1&q=ninh&cols=name,name_with_type
Parameter Type Description
q string Optional Từ khoá tìm kiếm. VD: ninh
cols string Optional Tên cột muốn tìm kiếm, không dùng khoảng trắng (space). Cols khả dụng: name, slug, type, name_with_type, code. VD: name,name_with_type
page string Optional Dùng cho nhu cầu phân trang (pagination).
limit string Optional Số lượng item / trang. Nhập -1 để lấy toàn bộ danh sách.

2. Lấy danh sách Quận / Huyện / Thị xã / Thành phố (trực thuộc tỉnh)

  GET /districts/getAll

Run Demo tại HTTPie với script:

http -v https://vn-public-apis.fpo.vn/districts/getAll?limit=-1
http -v https://vn-public-apis.fpo.vn/districts/getAll?limit=-1&q=ninh&cols=name,name_with_type
Parameter Type Description
q string Optional Từ khoá tìm kiếm. VD: ninh
cols string Optional Tên cột muốn tìm kiếm, không dùng khoảng trắng (space). Cols khả dụng: name, slug, type, name_with_type, code. VD: name,name_with_type
page string Optional Dùng cho nhu cầu phân trang (pagination).
limit string Optional Số lượng item / trang. Nhập -1 để lấy toàn bộ danh sách.

3. Lấy danh sách Quận / Huyện / Thị xã / Thành phố (trực thuộc tỉnh) theo Tỉnh / Thành phố (Thành phố trực thuộc Trung ương)

  GET /districts/getByProvince

Run Demo tại HTTPie với script:

http -v https://vn-public-apis.fpo.vn/districts/getByProvince?provinceCode=72
http -v https://vn-public-apis.fpo.vn/districts/getByProvince?provinceCode=72&limit=-1
Parameter Type Description
provinceCode string Required Mã của tỉnh / thành phố (trực thuộc trung ương). VD: provinceCode=72
q string Optional Từ khoá tìm kiếm. VD: ninh
cols string Optional Tên cột muốn tìm kiếm, không dùng khoảng trắng (space). Cols khả dụng: name, slug, type, name_with_type, code. VD: name,name_with_type
page string Optional Dùng cho nhu cầu phân trang (pagination).
limit string Optional Số lượng item / trang. Nhập -1 để lấy toàn bộ danh sách.

4. Lấy danh sách Phường / Xã / Thị trấn / Thôn / Đội

  GET /wards/getAll

Run Demo tại HTTPie với script:

http -v https://vn-public-apis.fpo.vn/wards/getAll?limit=-1
http -v https://vn-public-apis.fpo.vn/wards/getAll?limit=-1&q=ninh&cols=name,name_with_type
Parameter Type Description
q string Optional Từ khoá tìm kiếm. VD: ninh
cols string Optional Tên cột muốn tìm kiếm, không dùng khoảng trắng (space). Cols khả dụng: name, slug, type, name_with_type, code. VD: name,name_with_type
page string Optional Dùng cho nhu cầu phân trang (pagination).
limit string Optional Số lượng item / trang. Nhập -1 để lấy toàn bộ danh sách.

5. Lấy danh sách Phường / Xã / Thị trấn / Thôn / Đội theo Quận / Huyện / Thị xã / Thành phố (trực thuộc tỉnh)

  GET /wards/getByDistrict

Run Demo tại HTTPie với script:

http -v https://vn-public-apis.fpo.vn/wards/getByDistrict?districtCode=712
http -v https://vn-public-apis.fpo.vn/wards/getByDistrict?districtCode=712&limit=-1
Parameter Type Description
districtCode string Required Mã của Quận / Huyện / Thị xã / Thành phố (trực thuộc tỉnh). VD: districtCode=712
q string Optional Từ khoá tìm kiếm. VD: ninh
cols string Optional Tên cột muốn tìm kiếm, không dùng khoảng trắng (space). Cols khả dụng: name, slug, type, name_with_type, code. VD: name,name_with_type
page string Optional Dùng cho nhu cầu phân trang (pagination).
limit string Optional Số lượng item / trang. Nhập -1 để lấy toàn bộ danh sách.

Author

Dương Trần Hà Phương (Mr.) - CEO Công ty TNHH FPO

vn-public-apis's People

Contributors

dthphuong avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.