Philippine Law Data — Lawphil avatar

Philippine Law Data — Lawphil

Pricing

from $2.50 / 1,000 legislation records

Go to Apify Store
Philippine Law Data — Lawphil

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

dedy iskandar

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Features

Limited permissions

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

WhatDetail
Coverage~45,500 legislative documents + ~67,000 Supreme Court decisions
Eleven collectionsRepublic Acts, Executive Orders, Acts of Congress, Proclamations, Administrative Orders, Memorandum Orders, Memorandum Circulars, Batas Pambansa Blg., Commonwealth Acts, General Orders, Supreme Court jurisprudence
Official numbersRepublic Act No. 12317, Executive Order No. 29, G.R. No. 279863 — exactly as the Supreme Court publishes them
Official PDFspdfUrl points at Lawphil's own PDF path — the file is never downloaded, only linked
DatesNormalised to ISO-8601 (YYYY-MM-DD)
Issuer & citationKept where the source states them (issuing President, formal citation)
Judgment metadataReporter reference (598 SCRA), ponente, and subject area for jurisprudence
Deterministic idsid = <collection>:<document number>:<source file slug>, stable across runs
No duplicationRecords are de-duplicated in-flight, even when the source repeats rows
Verified links95.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 textTurn 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 valueWhat it contains≈ Records
republicRepublic Acts and their IRRs12,072
execordExecutive Orders5,904
actsActs of Congress4,279
proclamationsPresidential Proclamations14,013
aoAdministrative Orders2,858
moMemorandum Orders2,438
mcMemorandum Circulars2,268
bataspambansaBatas Pambansa Blg.891
commonwealthCommonwealth Acts733
genorGeneral Orders85
jurisprudenceSupreme Court jurisprudence66,998

Counts are the total reported 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

FieldTypeDefaultDescription
collectionsarrayall ten legislative collectionsCollections to scrape.
yearsarray[]Server-side year filter, e.g. [2024, 2025]. Empty = every year.
searchstring""Server-side keyword matched against every field of a document (number, title, citation).
includeFullTextbooleanfalseAlso fetch each document's page and attach the clean text as fullText.
includePdfbooleantrueInclude the official PDF URL in pdfUrl. The PDF is never downloaded.
maxItemsinteger100Max records written this run. Hard cap 60000.
maxPagesinteger0Max API pages this run (0 = unlimited). Each page returns up to 100 records.
resumebooleantrueContinue 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"
}
FieldTypeNotes
idstring<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
collectionstringSource collection id
collectionLabelstringHuman-readable collection name
docTypestringstatute | act | executive-order | proclamation | administrative-order | memorandum-order | memorandum-circular | batas-pambansa | commonwealth-act | general-order | decision
numberstringOfficial document number as published
titlestringOfficial title / short title
datestringISO-8601 (YYYY-MM-DD)
yearintegerDerived from the date
htmlUrlstringLawphil HTML page for the document
pdfUrlstringOfficial PDF URL, null when the source has none
pdfAvailablebooleantrue when the source record carries a PDF
issuerstringIssuing authority, when stated
citationstringFormal citation, when provided
referencestringReporter reference, e.g. 598 SCRA (jurisprudence only)
ponentestringJustice who wrote the opinion (jurisprudence only)
subjectstringSubject area of the decision (jurisprudence only)
fullTextstringClean statutory or opinion text — only with includeFullText: true
fullTextCharsintegerLength of the extracted full text
scrapedAtstringISO-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.

EventPrice (USD)Charged when
legislation0.0025One legislative record is written to your dataset
jurisprudence0.0020One 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.

Planlegislation eventjurisprudence 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:

RecordsLegislationJurisprudence
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 input key 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 applied
curl -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 body
curl -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

  1. Requests the Lawphil public JSON API in pages of 100 records, applying the year and search filters server-side so the Actor never downloads what you excluded.
  2. 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.
  3. Normalises every record to the public schema above.
  4. Optionally fetches the document page and extracts the clean statutory text (trailing markup and the source's stray footer characters are stripped).
  5. Pushes the batch to the dataset, then charges for exactly those records.
  6. 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

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 sourceLink resolves
HTML page1,057 records1,012 (95.7%)
PDF691 records648 (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 htmlUrl is 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 years set 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.persistent tells 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: true the Actor fetches each document page. If a page is missing upstream, that record gets fullText: null and 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.