BYTETOOLS

PSGC (Philippines) API

Free Philippine Standard Geographic Code API with no key: regions, provinces, cities, municipalities and all 42,000 barangays, with official PSGC codes. Tested example included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the PSGC (Philippines) API?

The PSGC API is a free, key-free REST wrapper around the Philippine Standard Geographic Code — the official hierarchy of regions, provinces, cities, municipalities, sub-municipalities and barangays maintained by the Philippine Statistics Authority.

Philippine address hierarchies are deeper than most and the levels are genuinely unlike other countries: below the province sit cities and municipalities, and below those roughly 42,000 barangays, the smallest administrative unit. Any form or database that handles Philippine addresses has to model all of it, and the PSGC is the only authoritative source for the codes.

This API serves that hierarchy as plain JSON files with no query language, which is a deliberate trade. Every endpoint returns a complete level or a complete subtree, so `/regions/` gives all seventeen regions in one call and `/regions/{code}/provinces/` gives that region's provinces. Watch the code arithmetic: the older nine-digit code and the newer `psgc10DigitCode` both appear on every record, and mixing the two when joining to another dataset will silently produce no matches.

Quick facts

Base URL
https://psgc.gitlab.io/api
Authentication
No key or account. Static JSON generated from Philippine Statistics Authority publications and served over a CDN.
Rate limit
No limit — the responses are static files behind a CDN, so caching handles the load.
Pricing
Free and open source.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the PSGC (Philippines) API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. List every administrative region of the Philippines

GET https://psgc.gitlab.io/api/regions/

curl
curl 'https://psgc.gitlab.io/api/regions/'
JavaScript (fetch)
const res = await fetch("https://psgc.gitlab.io/api/regions/");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://psgc.gitlab.io/api/regions/", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
[
  {
    "code": "010000000",
    "name": "Ilocos Region",
    "regionName": "Region I",
    "islandGroupCode": "luzon",
    "psgc10DigitCode": "0100000000"
  },
  {
    "code": "020000000",
    "name": "Cagayan Valley",
    "regionName": "Region II",
    "islandGroupCode": "luzon",
    "psgc10DigitCode": "0200000000"
  },
  {
    "code": "030000000",
    "name": "Central Luzon",
    "regionName": "Region III",
    "islandGroupCode": "luzon",
    "psgc10DigitCode": "0300000000"
  },
  {
    "code": "040000000",
    "name": "CALABARZON",
    "regionName": "Region IV-A",
    "islandGroupCode": "luzon",
    "psgc10DigitCode": "0400000000"
  },
  {
    "code": "170000000",
    "name": "MIMAROPA Region",
    "regionName": "MIMAROPA Region",
    "islandGroupCode": "luzon",
    "psgc10DigitCode": "1700000000"
  },
  {
    "code": "050000000",
    "name": "Bicol Region",
    "regionName": "Region V",
    "islandGroupCode": "luzon",
    "psgc10DigitCode": "0500000000"
  },
  {
    "code": "060000000",
    "name": "Western Visayas",
    "regionName": "Region VI",
    "islandGroupCode": "visayas",
    "psgc10DigitCode": "0600000000"
  },
  {
    "code": "070000000",
    "name": "Central Visayas",
    "regionName": "Region VII",
    "islandGroupCode": "visayas",
    "psgc10DigitCode": "0700000000"
  },
  {
    "code": "080000000",
    "name": "Eastern Visayas",
    "regionName": "Region VIII",
    "islandGroupCode": "visayas",
    "psgc10DigitCode": "0800000000"
  },
  {
    "code": "090000000",
    "name": "Zamboanga Peninsula",
    "regionName": "Region IX",
    "islandGroupCode": "

Parameters

ParameterTypeRequiredDescription
(regions)pathOptional`/regions/` returns all regions; `/regions/{code}/` returns one. 010000000
(provinces)pathOptional`/provinces/` for all, or `/regions/{code}/provinces/` for one region's. 012800000
(cities-municipalities)pathOptionalCities and municipalities, listable under a province or region. 012801000
(barangays)pathOptional`/barangays/` returns all 42,000 — large. Prefer scoping to a city or municipality. 012801001
(island-groups)pathOptional`/island-groups/` splits the country into luzon, visayas and mindanao. luzon

Response fields

codestring
Nine-digit PSGC code, zero-padded. Always a string — leading zeros are significant.
psgc10DigitCodestring
The newer ten-digit form of the same code. Pick one convention and keep to it when joining datasets.
namestring
Official name of the unit.
regionNamestring
Roman-numeral region designation such as "Region I", which is how regions are usually referenced in Philippine documents.
islandGroupCodestring
`luzon`, `visayas` or `mindanao` — a useful coarse grouping for shipping zones and reporting.
(lower levels) provinceCode, cityCode, municipalityCodestring
Parent codes carried on province, city and barangay records, which is what lets you rebuild the tree offline.

What you can build with the PSGC (Philippines) API

  • Build a cascading region → province → city → barangay address selector
  • Validate Philippine addresses against official codes rather than free text
  • Assign delivery zones by island group
  • Join business data to Philippine Statistics Authority datasets
  • Seed a local reference table for offline address validation

Common errors and how to fix them

Codes lose their leading zeros

PSGC codes are zero-padded strings and loose parsers coerce them to numbers.

Fix: Treat every code as a string. "010000000" and 10000000 are not the same value and will not join.

The barangay endpoint returns a huge payload

There are roughly 42,000 barangays and `/barangays/` returns all of them.

Fix: Scope the request to a city or municipality with `/cities-municipalities/{code}/barangays/`, or download once and cache locally.

Content-Type is text/html

Not an error — the files are served statically and the CDN mislabels them.

Fix: The body is valid JSON. Parse it directly rather than trusting the content type header.

A code is missing from an older dataset

Municipalities are created, merged and reclassified between PSGC publications.

Fix: Check which PSGC release your other dataset used. The API tracks the current publication, so historical codes may not appear.

PSGC (Philippines) API — frequently asked questions

Is the PSGC API free?

Yes, free with no key, account or rate limit. It is an open-source project that publishes Philippine Statistics Authority data as static JSON behind a CDN.

What is a barangay?

It is the smallest administrative unit in the Philippines, below a city or municipality, and there are roughly 42,000 of them. Philippine addresses normally include the barangay, so any address form for the country needs the full four-level hierarchy.

Which code should I store, the 9-digit or the 10-digit?

Either, but only one. Both appear on every record; the ten-digit form is the newer PSA convention. Mixing them across tables is a common source of joins that quietly return nothing.

Can I get all barangays for one city?

Yes — `/cities-municipalities/{code}/barangays/` scopes the list. Fetching the global `/barangays/` endpoint pulls tens of thousands of records you almost certainly do not need.

Tools that pair with this API

PSGC (Philippines) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.