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