
This API lets you retrieve information about regions and their provinces, cities, municipalities, sub-municipalities, and barangays in the Philippines. The API returns data in JSON format, providing a convenient way to access the information programmatically.
Accessing All Regions #
To access all regions, you can make a GET request to the following endpoint:
https://psgc.cloud/api/regions
This will return a JSON object containing information about all the regions in the Philippines.
Accessing a Single Region #
If you want to retrieve information about a specific region, you can use either the region code or name value. For example, to access the region with code “0200000000”, you can make a GET request to the following endpoint:
https://psgc.cloud/api/regions/0200000000
This will return a JSON object containing information about the region with the specified code.
Accessing Provinces of a Region #
To access the provinces within a region, you can append “/provinces” to the region endpoint. For example, to retrieve the provinces within the region with code “0200000000”, you can make a GET request to the following endpoint:
https://psgc.cloud/api/regions/0200000000/provinces
This will return a JSON object containing information about the provinces within the specified region.
Accessing Cities of a Region #
To access the cities within a region, you can append “/cities” to the region endpoint. For example, to retrieve the cities within the region with code “0200000000”, you can make a GET request to the following endpoint:
https://psgc.cloud/api/regions/0200000000/cities
This will return a JSON object containing information about the cities within the specified region.
Accessing Municipalities of a Region #
To access the municipalities within a region, you can append “/municipalities” to the region endpoint. For example, to retrieve the municipalities within the region with code “0200000000”, you can make a GET request to the following endpoint:
https://psgc.cloud/api/regions/0200000000/municipalities
This will return a JSON object containing information about the municipalities within the specified region.
Accessing Sub-Municipalities of a Region #
To access the sub-municipalities within a region, you can append “/sub-municipalities” to the region endpoint. For example, to retrieve the sub-municipalities within the region with code “0200000000”, you can make a GET request to the following endpoint:
https://psgc.cloud/api/regions/0200000000/sub-municipalities
This will return a JSON object containing information about the sub-municipalities within the specified region.
Accessing Cities and Municipalities of a Region #
If you want to retrieve both cities and municipalities within a region, you can append “/cities-municipalities” to the region endpoint. For example, to retrieve both cities and municipalities within the region with code “0200000000”, you can make a GET request to the following endpoint:
https://psgc.cloud/api/regions/0200000000/cities-municipalities
This will return a JSON object containing information about both cities and municipalities within the specified region.
Accessing Barangays of a Region #
To access the barangays within a region, you can append “/barangays” to the region endpoint. For example, to retrieve the barangays within the region with code “0200000000”, you can make a GET request to the following endpoint:
https://psgc.cloud/api/regions/0200000000/barangays
This will return a JSON object containing information about the barangays within the specified region.
That’s it! You now have the necessary information to start using the PSGC Cloud Regions API. Feel free to explore the different endpoints and retrieve the data you need for your applications.