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. rootscratch/psgc

ActiveLibrary

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

Philippine Standard Geographic Code API By Rootscratch

v1.1.0(1y ago)102463[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 1mo ago

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 64% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity23

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

454d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/96e7723302f2828740841377232dddee236a773b0873fbe7a3a90aed929e6de5?d=identicon)[jaycee0610](/maintainers/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

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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