PHPackages                             rootscratch/psgc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rootscratch/psgc

ActiveLibrary[API Development](/categories/api)

rootscratch/psgc
================

Philippine Standard Geographic Code API By Rootscratch

v1.1.0(1y ago)119473[2 issues](https://github.com/jaycee0610/PSGC-API/issues)MITPHP

Since Feb 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jaycee0610/PSGC-API)[ Packagist](https://packagist.org/packages/rootscratch/psgc)[ RSS](/packages/rootscratch-psgc/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

[![Screenshot](https://raw.githubusercontent.com/jaycee0610/PSGC-API/refs/heads/main/image.png)](https://raw.githubusercontent.com/jaycee0610/PSGC-API/refs/heads/main/image.png)

Overview
--------

[](#overview)

The PSGC-API provides access to the Philippine Standard Geographic Code (PSGC) data. This API allows users to retrieve information about regions, provinces, cities, municipalities, and barangays in the Philippines.

Features
--------

[](#features)

- Retrieve data for all regions, provinces, cities, municipalities, and barangays
- Filter data based on specific criteria
- Easy integration with other applications

Installation
------------

[](#installation)

To install the PSGC-API via Composer, run the following command:

```
composer require rootscratch/psgc
```

Usage
-----

[](#usage)

To use the PSGC-API in your PHP project, include the Composer autoloader:

```
require 'vendor/autoload.php';

use Rootscratch\PSGC\PSGC;

$psgcApi = new PSGC();
$regions = $psgcApi->Regions();
print_r($regions);
```

- `$psgcApi->Regions($region_id = null)` - Retrieve all regions
- `$psgcApi->Provinces($province_id = null)` - Retrieve all provinces
- `$psgcApi->MunicipalAndCities($MunicipalAndCities_ID = null)` - Retrieve all cities &amp; municipalities
- `$psgcApi->Municipal($municipal_id = null)` - Retrieve all Municipal
- `$psgcApi->City($city_id = null)` - Retrieve all City
- `$psgcApi->Barangays($barangay_id = null)` - Retrieve all barangays

Map Locator
-----------

[](#map-locator)

[![Map](https://raw.githubusercontent.com/jaycee0610/PSGC-API/refs/heads/main/map.gif)](https://raw.githubusercontent.com/jaycee0610/PSGC-API/refs/heads/main/map.gif)

To view a sample of the map locator, visit [this link](https://psgc.rootscratch.com/map.html).

Contributing
------------

[](#contributing)

Contributions are welcome! Please fork the repository and submit a pull request.

Contact
-------

[](#contact)

For any questions or inquiries, please contact Rootscratch at .

Packagist
---------

[](#packagist)

The PSGC-API is also available on Packagist: [rootscratch/psgc](https://packagist.org/packages/rootscratch/psgc)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

2

Last Release

501d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/120337618?v=4)[John Christian Natividad](/maintainers/jaycee0610)[@jaycee0610](https://github.com/jaycee0610)

---

Top Contributors

[![jaycee0610](https://avatars.githubusercontent.com/u/120337618?v=4)](https://github.com/jaycee0610 "jaycee0610 (14 commits)")

---

Tags

philippine-standard-geographic-codepsgcpsgc-apipsgc-phppsgc-rootscratchrootscratch

### Embed Badge

![Health badge](/badges/rootscratch-psgc/health.svg)

```
[![Health](https://phpackages.com/badges/rootscratch-psgc/health.svg)](https://phpackages.com/packages/rootscratch-psgc)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
