Philippine Law Data — Lawphil
Pricing
from $2.50 / 1,000 legislation records
Philippine Law Data — Lawphil
Philippine legislation and Supreme Court jurisprudence from the official Lawphil portal: 45,500+ statutes, executive orders, proclamations and administrative issuances plus 67,000 decisions, with official document numbers, dates, titles and PDF links.
Pricing
from $2.50 / 1,000 legislation records
Rating
0.0
(0)
Developer
dedy iskandar
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Features
Share
Philippine Law Data — Lawphil (Arellano Law Foundation)
Scrape Philippine legislation and Supreme Court jurisprudence from the official Lawphil e-Library — lawphil.net — into clean, structured JSON.
Every record is normalised to the same schema, regardless of which of the eleven source collections it came from: official document number, title, date, document type, the official Lawphil page, and the official PDF link whenever the source publishes one.
No proxies, no browser, no API key. Lawphil serves its data through a public JSON API; this Actor reads it directly.
What you get
| What | Detail |
|---|---|
| Coverage | ~45,500 legislative documents + ~67,000 Supreme Court decisions |
| Eleven collections | Republic Acts, Executive Orders, Acts of Congress, Proclamations, Administrative Orders, Memorandum Orders, Memorandum Circulars, Batas Pambansa Blg., Commonwealth Acts, General Orders, Supreme Court jurisprudence |
| Official numbers | Republic Act No. 12317, Executive Order No. 29, G.R. No. 279863 — exactly as the Supreme Court publishes them |
| Official PDFs | pdfUrl points at Lawphil's own PDF path — the file is never downloaded, only linked |
| Dates | Normalised to ISO-8601 (YYYY-MM-DD) |
| Issuer & citation | Kept where the source states them (issuing President, formal citation) |
| Judgment metadata | Reporter reference (598 SCRA), ponente, and subject area for jurisprudence |
| Deterministic ids | id = <collection>:<document number>:<source file slug>, stable across runs |
| No duplication | Records are de-duplicated in-flight, even when the source repeats rows |
| Verified links | 95.7% of published HTML pages and 93.8% of published PDF links were live when this Actor was last checked — see Link availability |
| Optional full text | Turn on includeFullText to get the clean statutory or opinion text |
Collections
Pick one or more with the collections input. The default is all ten legislative collections.
collections value | What it contains | ≈ Records |
|---|---|---|
republic | Republic Acts and their IRRs | 12,072 |
execord | Executive Orders | 5,904 |
acts | Acts of Congress | 4,279 |
proclamations | Presidential Proclamations | 14,013 |
ao | Administrative Orders | 2,858 |
mo | Memorandum Orders | 2,438 |
mc | Memorandum Circulars | 2,268 |
bataspambansa | Batas Pambansa Blg. | 891 |
commonwealth | Commonwealth Acts | 733 |
genor | General Orders | 85 |
jurisprudence | Supreme Court jurisprudence | 66,998 |
Counts are the
totalreported by the Lawphil API at build time (2026-11). The corpus grows; treat them as a guide. Legislation totals ~45,541 source rows, of which 45,396 are distinct documents (the source repeats 145 rows verbatim).
jurisprudence is opt-in because it is a much larger corpus and it is billed under a separate pay-per-event. Add it explicitly:
{ "collections": ["jurisprudence"], "maxItems": 1000 }
Input
| Field | Type | Default | Description |
|---|---|---|---|
collections | array | all ten legislative collections | Collections to scrape. |
years | array | [] | Server-side year filter, e.g. [2024, 2025]. Empty = every year. |
search | string | "" | Server-side keyword matched against every field of a document (number, title, citation). |
includeFullText | boolean | false | Also fetch each document's page and attach the clean text as fullText. |
includePdf | boolean | true | Include the official PDF URL in pdfUrl. The PDF is never downloaded. |
maxItems | integer | 100 | Max records written this run. Hard cap 60000. |
maxPages | integer | 0 | Max API pages this run (0 = unlimited). Each page returns up to 100 records. |
resume | boolean | true | Continue from where the previous identical run stopped. |
Example: one topic across all legislation
{"collections": ["republic", "execord", "proclamations"],"search": "data privacy","maxItems": 500}
Example: everything enacted in 2025
{"collections": ["republic", "acts", "proclamations"],"years": [2025],"maxItems": 2000}
Example: recent Supreme Court decisions with full text
{"collections": ["jurisprudence"],"years": [2024, 2025, 2026],"includeFullText": true,"maxItems": 300}
Example: a full legislative snapshot
{"collections": ["republic","execord","acts","proclamations","ao","mo","mc","bataspambansa","commonwealth","genor"],"maxItems": 60000,"resume": true}
Output
One dataset item per document. Empty strings and null mean the source does not provide that value for this document — they are never invented.
{"id": "republic:Republic Act No. 12317:ra_12317_2023","collection": "republic","collectionLabel": "Republic Acts","docType": "statute","number": "Republic Act No. 12317","title": "AN ACT TO PROTECT THE RIGHT OF INDIVIDUALS TO PERSONAL DATA","date": "2023-09-06","year": 2023,"htmlUrl": "https://lawphil.net/statutes/repacts/ra2023/ra_12317_2023.htm","pdfUrl": "https://lawphil.net/statutes/repacts/ra2023/pdf/ra_12317_2023.pdf","pdfAvailable": true,"issuer": "President Ferdinand R. Marcos Jr.","scrapedAt": "2026-11-16T09:14:03.118Z"}
| Field | Type | Notes |
|---|---|---|
id | string | <collection>:<document number>:<source file slug> — stable and unique per document, even when the same document number is reused in a later year or month |
collection | string | Source collection id |
collectionLabel | string | Human-readable collection name |
docType | string | statute | act | executive-order | proclamation | administrative-order | memorandum-order | memorandum-circular | batas-pambansa | commonwealth-act | general-order | decision |
number | string | Official document number as published |
title | string | Official title / short title |
date | string | ISO-8601 (YYYY-MM-DD) |
year | integer | Derived from the date |
htmlUrl | string | Lawphil HTML page for the document |
pdfUrl | string | Official PDF URL, null when the source has none |
pdfAvailable | boolean | true when the source record carries a PDF |
issuer | string | Issuing authority, when stated |
citation | string | Formal citation, when provided |
reference | string | Reporter reference, e.g. 598 SCRA (jurisprudence only) |
ponente | string | Justice who wrote the opinion (jurisprudence only) |
subject | string | Subject area of the decision (jurisprudence only) |
fullText | string | Clean statutory or opinion text — only with includeFullText: true |
fullTextChars | integer | Length of the extracted full text |
scrapedAt | string | ISO-8601 run timestamp |
Field names are treated as a stable public contract.
The Actor also writes a run summary to the default key-value store (OUTPUT) with per-collection statistics, resume offsets, and stop reasons.
Pricing
Pay-per-event. You pay for data, not for run time, memory or proxies.
| Event | Price (USD) | Charged when |
|---|---|---|
legislation | 0.0025 | One legislative record is written to your dataset |
jurisprudence | 0.0020 | One Supreme Court decision is written to your dataset |
Plan-based discount events are registered for higher-priced plans and switch themselves on automatically when the platform exposes the user's plan. The base event price never changes.
| Plan | legislation event | jurisprudence event |
|---|---|---|
| Free | $0.0025 | $0.0020 |
| Bronze | $0.0023 | $0.0018 |
| Silver | $0.0020 | $0.0016 |
| Gold | $0.0018 | $0.0014 |
| Platinum | $0.0016 | $0.0012 |
| Diamond | $0.0014 | $0.0010 |
Reference costs:
| Records | Legislation | Jurisprudence |
|---|---|---|
| 100 | $0.25 | $0.20 |
| 1,000 | $2.50 | $2.00 |
| 10,000 | $25.00 | $20.00 |
| Full corpus | ~$113 (45,396 records) | ~$134 (66,998 records) |
Charging rules:
- Write first, charge second. A record is only charged after it has been successfully pushed to the dataset. If storage fails, you are not charged for it.
- No charge for empty results. A keyword with no matches costs nothing.
- Budget is respected mid-run. If your run's maximum charge is reached, the Actor stops cleanly and keeps the records already delivered.
- No double billing within a run. Duplicated rows from the source are collapsed before charging. This holds across API pages too, not just inside one page: the Actor keeps a hash of every record it has already written and skips repeats that reappear on a later page.
- Re-runs only pay for new records. With
resume: true, a second run continues where the first stopped instead of re-billing the same documents. Documents already written by a previous run with the same settings are skipped and never charged again. - The minimum spend floor is $0.10. That is low enough for any sensible filtered run. Your own per-run budget is what actually limits how much a run may buy — raise it in the Apify Console if you want the whole 45,396-record corpus in one go (~$113).
Note: because the Actor runs under the platform's limited-permissions profile, the user's plan cannot be read at run time, so every customer is currently charged the base event price above. The discount ladder switches itself on automatically if the platform ever exposes the plan — it is never charged for a tier the customer did not qualify for.
Running it from the API
Pass the input flat. The Apify run API silently discards a payload whose input is wrapped in an
inputkey and falls back to the schema defaults — your filter is lost and you are billed for the default corpus. Send the fields at the top level of the request body.
# WRONG - the nested "input" object is discarded, defaults are appliedcurl -X POST "https://api.apify.com/v2/acts/1ZcBH9CtQLUc64yFF/runs?token=$APIFY_TOKEN" \-H 'Content-Type: application/json' \-d '{"input":{"collections":["republic"],"maxItems":50}}'# RIGHT - flat bodycurl -X POST "https://api.apify.com/v2/acts/1ZcBH9CtQLUc64yFF/runs?token=$APIFY_TOKEN" \-H 'Content-Type: application/json' \-d '{"collections":["republic"],"maxItems":50}'
The Apify Console, the Apify MCP server and the apify CLI all send flat input correctly, so this only matters for hand-written API calls.
Every run writes its effective input to the default key-value store under OUTPUT, alongside the per-collection statistics. If the input you sent is not what you see there, you were charged for something else — check it before a large run.
How it works
- Requests the Lawphil public JSON API in pages of 100 records, applying the
yearandsearchfilters server-side so the Actor never downloads what you excluded. - Resolves each document's HTML and PDF URLs from the source's own path scheme, so links are built locally without an extra HTTP request per record.
- Normalises every record to the public schema above.
- Optionally fetches the document page and extracts the clean statutory text (trailing markup and the source's stray footer characters are stripped).
- Pushes the batch to the dataset, then charges for exactly those records.
- Saves the per-collection page offset plus a hashed fingerprint of every record already written, so the next run resumes instead of restarting — and never re-bills a document it has already delivered.
Requests are spaced out (~200 ms) and retried with exponential backoff, so the portal stays comfortable.
Limitations
Link availability
Lawphil is a volunteer-maintained archive, and its API sometimes lists a document before the file is uploaded (or after it is removed). The Actor reports what the source claims and never invents a substitute link.
Measured on a 1,085-record sample across all eleven collections (2026-11):
| Claimed by the source | Link resolves | |
|---|---|---|
| HTML page | 1,057 records | 1,012 (95.7%) |
| 691 records | 648 (93.8%) | |
| Records with a working PDF link | — | 648 of 1,085 (59.7%) |
Per collection, published HTML pages resolve at 94–100%, except Supreme Court jurisprudence. Within jurisprudence the only failing batch is January 2026 (4 of 47 pages live) — the API carries those decisions before Arellano uploads the files. Every other month resolves at 97–100%.
The 59.7% figure for PDFs is not a defect: Acts of Congress, Commonwealth Acts, General Orders and most Batas Pambansa Blg. are published as HTML only, and the source marks them as having no PDF. Those records carry pdfUrl: null and pdfAvailable: false rather than a broken link.
Other limitations
- Some legislative rows have no HTML page. A number of API rows carry a PDF but no page URL — IRRs are the clearest example. Their
htmlUrlis empty. - Keyword search is server-side and matches every field. It is a substring match on number, title and citation — it is not a semantic search.
- Year filtering is per request. A run with
yearsset fetches only those years; a run without it walks the whole corpus. - No AI summaries in v1. Output is source-faithful data only, so nothing in the dataset is generated or inferred.
- Resume needs a named key-value store. The cursor is kept in a per-user store (
state-<userId>). If the platform refuses to create it for your account (some accounts restrict named storage creation from runs), the Actor logs a warning, falls back to the run's default store and continues — only resume across runs is then unavailable.OUTPUT.stateStore.persistenttells you which mode was used. - A completed scope restarts. Re-running a scope that was fully read returns the data again — and charges again. That is deliberate: you always get what you asked for.
- Full text is best-effort. With
includeFullText: truethe Actor fetches each document page. If a page is missing upstream, that record getsfullText: nulland a warning is logged; the run continues.
Use cases
- Legal-tech and compliance teams building a Philippine statute database.
- Law firms and in-house counsel tracking amendments, proclamations and executive issuances.
- Fintech, BPO, insurance and healthcare companies mapping sector regulation (Data Privacy Act, Financial Reporting, consumer protection).
- Regtech vendors enriching contract-review and due-diligence products with citable, current Philippine legal sources.
- Researchers and journalists analysing legislative output and Supreme Court trends over time.
- AI/RAG pipelines that need citable Philippine legal text with official PDF links.
Data source
Public data published by the Arellano Law Foundation, which operates the Lawphil e-Library for the Supreme Court of the Philippines — lawphil.net. This Actor reads only what the portal serves publicly, at a polite rate, and always links back to the official page and PDF.
The source is authoritative; this Actor is an access layer. Always verify against the official document before relying on it legally.
Support
Open an issue from the Actor's page in Apify Console with the run id and the input you used. Questions about coverage or a missing collection are welcome.