PHPackages                             bkintanar/psgc-api-wrapper - 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. bkintanar/psgc-api-wrapper

ActiveLibrary[API Development](/categories/api)

bkintanar/psgc-api-wrapper
==========================

PHP Wrapper for Philippine Standard Geographic Code API

0.6(5y ago)467.9k↓30.8%8[2 issues](https://github.com/bkintanar/psgc-api-wrapper/issues)MITPHP

Since Aug 26Pushed 5y ago4 watchersCompare

[ Source](https://github.com/bkintanar/psgc-api-wrapper)[ Packagist](https://packagist.org/packages/bkintanar/psgc-api-wrapper)[ GitHub Sponsors](https://github.com/ArlonAntonius)[ GitHub Sponsors](https://github.com/[user1)[ RSS](/packages/bkintanar-psgc-api-wrapper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

PHP Wrapper for Philippine Standard Geographic Code API
=======================================================

[](#php-wrapper-for-philippine-standard-geographic-code-api)

Overview
--------

[](#overview)

This package is a simple php wrapper for the PSGC API found here: .

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

[](#installation)

The recommended way to install PSGC API Wrapper is with Composer. Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project.

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

You can add PSGC API Wrapper as a dependency using Composer:

```
composer require bkintanar/psgc-api-wrapper
```

Alternatively, you can specify PSGC API Wrapper as a dependency in your project's existing composer.json file:

```
{
   "require": {
      "bkintanar/psgc-api-wrapper": "*"
   }
}
```

Supported Methods
-----------------

[](#supported-methods)

All endpoints provided by `https://github.com/bkintanar/psgc-api` are supported.

```
+----------+------------------------------------------+
| Method   | URI                                      |
+----------+------------------------------------------+
| GET|HEAD | api/barangays                            |
| GET|HEAD | api/barangays/{barangay}                 |
| GET|HEAD | api/cities                               |
| GET|HEAD | api/cities/{city}                        |
| GET|HEAD | api/districts                            |
| GET|HEAD | api/districts/{district}                 |
| GET|HEAD | api/municipalities                       |
| GET|HEAD | api/municipalities/{municipality}        |
| GET|HEAD | api/provinces                            |
| GET|HEAD | api/provinces/{province}                 |
| GET|HEAD | api/regions                              |
| GET|HEAD | api/regions/{region}                     |
| GET|HEAD | api/sub-municipalities                   |
| GET|HEAD | api/sub-municipalities/{subMunicipality} |
+----------+------------------------------------------+

```

### Using Laravel

[](#using-laravel)

#### Region

[](#region)

Region is the highest geographic level used by The Republic of the Philippines. The Philippines is divided into 17 regions as of 31 March 2020.

```
