The OpenAPI document is the contract. The directory, map, and profiles use the same read API. Responses carry source evidence, reference periods, and quality warnings.
Read-only endpoints need no key and are rate-limited. Do not probe for unpublished, private, or personal data. Published records trace to a registered source release.
Base URL
https://api.philapi.tech/v1
Pagination
Cursor-based for facility lists: opaque cursor, next_cursor, and has_more. Stable ordering by updated time and canonical ID.
Errors
Consistent JSON with code, message, optional details, and request_id. No SQL, file paths, credentials, or stack traces are returned.
Caching and CORS
Conditional JSON responses expose ETag and request timing. CORS is restricted to configured web origins; credentials are not enabled.
Request examples
# Search schools with coordinates
curl "https://api.philapi.tech/v1/facilities?type=school&has_coordinates=true&limit=5"
# One facility, by canonical slug or UUID from a search response
curl "https://api.philapi.tech/v1/facilities/{id}"
# Facility provenance and canonical history
curl "https://api.philapi.tech/v1/facilities/{id}/sources"
curl "https://api.philapi.tech/v1/facilities/{id}/history"
# Bounded map query (lon/lat order)
curl "https://api.philapi.tech/v1/facilities/within?bbox=120.9,14.5,121.1,14.7"
# Measured quality summary
curl "https://api.philapi.tech/v1/quality/summary"
Bounding boxes and nearby radii are capped server-side. Map clients must debounce viewport changes and keep a text result list available.
Endpoint families
Facilities
GET /v1/facilities
GET /v1/facilities/{id-or-slug}
GET /v1/facilities/{id-or-slug}/sources
GET /v1/facilities/{id-or-slug}/history
GET /v1/facilities/within?bbox=min_lon,min_lat,max_lon,max_lat
GET /v1/facilities/nearby?lat=&lon=&radius_m=
Schools and health
GET /v1/schools
GET /v1/schools/{id-or-slug}
GET /v1/schools/{id-or-slug}/resources
GET /v1/health-facilities
GET /v1/health-facilities/{id-or-slug}
GET /v1/health-facilities/{id-or-slug}/licenses
GET /v1/health-facilities/{id-or-slug}/accreditations
Geography
GET /v1/geographies?level=region
GET /v1/geographies/{psgc_code}
GET /v1/geographies/{psgc_code}/facilities
GET /v1/geography-releases
GET /v1/geography-crosswalk?from_release=&to_release=
Sources, quality, history
GET /v1/sources
GET /v1/sources/{slug}
GET /v1/source-releases?dataset=
GET /v1/quality/summary
GET /v1/quality/issues
GET /v1/quality/match-candidates?status=pending
GET /v1/quality/match-candidates/{candidate_id}
GET /v1/changes?since=
GET /v1/statistics
Downloads
GET /v1/downloads/facilities.csv
GET /v1/downloads/facilities.parquet
GET /v1/downloads/schools.csv
GET /v1/downloads/health-facilities.csv
Data rights are separate from code rights
The API software and schema are Apache-2.0 licensed; that does not grant rights to republish agency data. Downloads expose only publication-approved records, and each dataset page records its redistribution status.
Apache-2.0 codeSource data rights varyReal sources attributed