Regions API
Returns a paginated list of Philippine regions.
Endpoints
Section titled “Endpoints”List Regions
Section titled “List Regions”GET /v1/regions
Returns a paginated list of all geographical regions in the Philippines. Supports text search, filtering by region code, and optional geometry.
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1). |
limit | integer | No | Items per page (default: 10, max: 100). |
search | string | No | Filter regions by name (case-insensitive partial match). |
codes | string[] | No | Filter by one or more PSGC region codes (e.g. codes[]=0100000000&codes[]=1300000000). |
geometry | string | No | Include polygon geometry. One of simple, medium, or detailed. |
output | string | No | Set to geojson to return a GeoJSON FeatureCollection. Requires geometry to be set. |
Example Request
Section titled “Example Request”curl -H "Authorization: Bearer <token>" \ "https://api.gis.ph/v1/regions?page=1&limit=5"Example Response
Section titled “Example Response”{ "data": [ { "id": 1, "name": "Ilocos Region", "code": "0100000000" } ], "meta": { "total": 18, "page": 1, "limit": 5, "totalPages": 4, "links": { "self": "...", "next": "...", "prev": null } }, "error": null}Get Single Region
Section titled “Get Single Region”GET /v1/regions/{id}
Returns detailed information about a single region.
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The unique identifier of the region. |
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
geometry | string | No | Include polygon geometry. One of simple, medium, or detailed. |
Example Request
Section titled “Example Request”curl -H "Authorization: Bearer <token>" \ "https://api.gis.ph/v1/regions/1"Example Response
Section titled “Example Response”{ "data": { "id": 1, "name": "Ilocos Region", "code": "0100000000" }, "error": null}Search Regions
Section titled “Search Regions”POST /v1/regions/search
Accepts a list of PSGC region codes and returns matching regions. Supports both JSON and GeoJSON output formats.
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | List of PSGC region codes (1–100 items). |
geometry | string | No | Geometry level to include: simple (default), medium, or detailed. |
output | string | No | Output format: json (default) or geojson. |
Example Request
Section titled “Example Request”curl -X POST \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"ids":["0100000000","1300000000"],"geometry":"simple","output":"geojson"}' \ "https://api.gis.ph/v1/regions/search"Example Response (GeoJSON)
Section titled “Example Response (GeoJSON)”{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "MultiPolygon", "coordinates": [ ... ] }, "properties": { "id": 1, "name": "Ilocos Region", "code": "0100000000" } } ]}Example Response (JSON)
Section titled “Example Response (JSON)”[ { "id": 1, "name": "Ilocos Region", "code": "0100000000" }]