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