jeffrey.blog
← Projects

PSGC API

2025 v0.1.3

A Philippine geography API with official location data and population counts

Overview

What it is

A RESTful API providing access to the Philippine Standard Geographic Code (PSGC) data. The data is sourced from official PSGC Excel sheets, transformed into JSON using custom scripts, and grouped by PSGC specification codes for easy access and filtering.

Highlights

  • API versioning (V1 uses JSON files, V2 planned with a database)
  • Custom scripts to transform official PSGC Excel data to structured JSON
  • Rate limiting: 25 requests per 10 minutes (1 request per 10 minutes for the all-barangays endpoint)
  • Returns population numbers and counts for regions, provinces, cities and more
  • Redis caching with a 1-hour TTL for all endpoints
  • Pagination support for all endpoints
  • Swagger documentation
  • Filter by regions, provinces, cities, municipalities and barangays
  • Completely free and open source

Stack

  • Node.js
  • Express.js
  • Redis
  • Swagger
  • Winston