Barangays API
Returns a paginated list of Philippine barangays.
Endpoints
Section titled “Endpoints”List Barangays
Section titled “List Barangays”GET /v1/barangays
Returns a list of barangays. Filtering by province name is required. Optional starts-with search for municipality and barangay name are supported.
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
province | string | Yes | Exact (case-insensitive) name of the province. |
municipality | string | No | Starts-with search for municipality or city name. |
name | string | No | Starts-with search for the barangay name. |
page | integer | No | Page number (default: 1). |
limit | integer | No | Items per page (default: 10, max: 100). |
Example Request
Section titled “Example Request”curl -H "Authorization: Bearer <token>" \ "https://api.gis.ph/v1/barangays?province=Cebu&municipality=Poro&limit=5"Get Single Barangay
Section titled “Get Single Barangay”GET /v1/barangays/{id}
Returns detailed information about a single barangay.
Parameters
Section titled “Parameters”id(path): The unique identifier of the barangay.
Example Request
Section titled “Example Request”curl -H "Authorization: Bearer <token>" \ "https://api.gis.ph/v1/barangays/12345"Example Response
Section titled “Example Response”{ "data": { "id": 12345, "name": "Poblacion", "code": "072210001", "population": 2500, "municipality_id": 1595 }, "error": null}