Malaysian Law Data — AGC Laws of Malaysia avatar

Malaysian Law Data — AGC Laws of Malaysia

Pricing

from $2.50 / 1,000 legislation records

Go to Apify Store
Malaysian Law Data — AGC Laws of Malaysia

Malaysian Law Data — AGC Laws of Malaysia

Malaysian federal legislation from the official AGC portal (lom.agc.gov.my): 19,600+ Principal, Amendment, Constitution and subsidiary legislation records with EN/BM titles, dates, status and official PDF links. Pay-per-event, no proxies, no browser.

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

4 days ago

Last modified

Features

Limited permissions

Share

Malaysian Law Data — AGC (Laws of Malaysia)

Scrape Malaysian federal legislation from the official Attorney General's Chambers portal — lom.agc.gov.my — into clean, structured JSON.

Every record is normalised to the same schema, regardless of which of the ten source collections it came from: bilingual titles (English + Malay), act numbers, status, dates, and a direct link to the official PDF issued by AGC.

No proxies, no browser, no API key. The portal serves its data through an encrypted JSON endpoint; this Actor decrypts it directly.


What you get

WhatDetail
Coverage~19,600 documents across 10 collections
Bilingual titlestitleEN and titleBM separated from the source's combined title cells
Official PDFspdfEN / pdfBM point at AGC's own download gateway — always downloadable, no extra request per record
DatesPublication, royal assent and commencement, normalised to ISO-8601
StatusLatest consolidated version, revised, translated, repealed, etc.
Repeal relationsRepealed acts carry a repealedBy object with the repealing act
Parent actSubsidiary legislation carries a parentAct object linking to the parent Act in both languages
Deterministic idsid = <collection>:<source identity>, stable across runs
No duplicationRecords are de-duplicated in-flight, even when the source repeats rows

Collections

Pick one or more with the collections input. Defaults are the three most useful for most buyers.

collections valueWhat it contains≈ Records
principal-originalPrincipal Acts as originally enacted893
principal-updatedPrincipal Acts, latest consolidated version889
principal-revisedPrincipal Acts — Revision of Laws timeline405
principal-translatedAuthoritative translations of principal Acts127
principal-repealedRepealed principal Acts (with the repealing act)113
amendmentAmendment Acts (Act A…)414
federal-constitutionFederal Constitution amendments (English + Malay naskhah merged)60
ordinanceSabah / Sarawak ordinances2
subsid-puaSubsidiary legislation — P.U.(A)7,392
subsid-pubSubsidiary legislation — P.U.(B)9,280

Counts are recordsTotal reported by the source at build time (2026-11). The portal grows; treat them as a guide.


Input

FieldTypeDefaultDescription
collectionsarray["principal-original","principal-updated","amendment"]Collections to scrape.
keywordstring""Server-side title filter. Empty = everything.
maxItemsinteger100Max records written this run. Hard cap 25000.
includeRawbooleanfalseAttach the untouched source record under raw.
resumebooleantrueContinue from where the previous identical run stopped.

Example: one act family by number

{
"collections": ["principal-updated", "principal-repealed"],
"maxItems": 50
}

Example: every subsidiary regulation mentioning a keyword

{
"collections": ["subsid-pua", "subsid-pub"],
"keyword": "perbekalan",
"maxItems": 1000
}

Example: a full corpus snapshot

{
"collections": [
"principal-original",
"principal-updated",
"principal-revised",
"principal-translated",
"principal-repealed",
"amendment",
"federal-constitution",
"ordinance",
"subsid-pua",
"subsid-pub"
],
"maxItems": 25000,
"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": "principal-original:13",
"collection": "principal-original",
"collectionLabel": "Principal Acts — as originally enacted",
"docType": "principal",
"actNo": "1",
"titleEN": "INCOME TAX ACT 1967",
"titleBM": "AKTA CUKAI PENDAPATAN 1967",
"status": "UPDATED",
"year": 1967,
"publicationDate": "1967-09-21",
"royalAssentDate": "1967-09-15",
"commencementDate": "1968-01-01",
"commencementRemark": "",
"language": "",
"sourceUrl": "https://lom.agc.gov.my/act-detail.php?act=1&lang=BI",
"pdfEN": "https://lom.agc.gov.my/ilims/upload/portal/akta/outputaktap/.../Income Tax Act 1967.pdf",
"pdfBM": "",
"scrapedAt": "2026-11-15T09:14:03.118Z"
}
FieldTypeNotes
idstring<collection>:<identity> — stable, unique per document
collectionstringSource collection id
collectionLabelstringHuman-readable collection name
docTypestringprincipal | amendment | constitution | ordinance | subsidiary
actNostringAct / P.U. number, e.g. 1, A1392, P.U. (A) 117/2003
titleENstringEnglish title, when the source has one
titleBMstringMalay title, when the source has one
statusstringStatus label from the source (UPDATED, REVISED, repealed, …)
yearintegerDerived from commencement, falling back to publication
publicationDatestringISO-8601
royalAssentDatestringISO-8601
commencementDatestringISO-8601
commencementRemarkstringFree-text note from the source
languagestringLanguage of the authoritative text, when stated (BI English, BM Malay, BI+BM when both naskhahs are merged)
sourceUrlstringAGC page for the document
pdfEN / pdfBMstringOfficial PDF URLs (AGC download gateway)
repealedByobject{actNo, titleEN, titleBM, url} — repealed acts only
parentActobject{urlEN, urlBM} — parent Act pages — subsidiary legislation only
scrapedAtstringISO-8601 run timestamp
rawobjectUntouched source record, only when includeRaw: true

Field names are treated as a stable public contract.


Pricing

Pay-per-event: $0.0025 per legislation record written to your dataset. You pay for data, not for run time, memory or proxies.

  • 100 records ≈ $0.25
  • 1,000 records ≈ $2.50
  • Full corpus (~19,600 records) ≈ $49

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-page. If your run's maximum charge is reached, the Actor stops cleanly and keeps the records already delivered.
  • 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.

Duplicated rows from the source are collapsed before charging, so you never pay twice for the same document in a single run.

Plan discounts are automatic. Five tier events are registered alongside the base event — Bronze $0.0023, Silver $0.0021, Gold $0.0019, Platinum $0.0017, Diamond $0.0015. The Actor reads the buyer's plan at run time and charges the matching price. Because some accounts cannot read the plan, the Actor falls back to the base price in that case; it never charges a discount the customer did not qualify for.

The minimum spend floor is $0.10. 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 19,600-record corpus in one go ($49).


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/vMHxFcrgTiJm0ahld/runs?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"input":{"collections":["subsid-pua"],"maxItems":50}}'
# RIGHT - flat body
curl -X POST "https://api.apify.com/v2/acts/vMHxFcrgTiJm0ahld/runs?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"collections":["subsid-pua"],"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. Loads the collection page, reads the per-session AES key and the JSON endpoint from the HTML (both rotate, so both are read fresh every run).
  2. Requests pages of 200 records with the collection's real field names — this is what keeps server-side pagination and ordering correct.
  3. Decrypts each response (AES-256-GCM), normalises every record to the public schema.
  4. Resolves PDF links locally by decoding the portal's base64 file tokens, avoiding one HTTP request per document.
  5. Pushes the page to the dataset, then charges for exactly those records.
  6. Saves the per-collection cursor so the next run resumes instead of restarting.

Requests are spaced out (~400 ms) to stay polite to a government portal.


Limitations

  • Legislation only. Court judgments live on a separate, JavaScript-only portal (cms2.kehakiman.gov.my) and are not part of this Actor.

  • No reprint collection. The source's reprint endpoint returns a server error (SQLSTATE[42S02]); it is disabled rather than shipped broken.

  • Keyword search is server-side and language-bound. The portal matches titles in each collection's primary language. Use Malay terms for amendment, subsid-* and principal-revised (e.g. perbekalan, not supply).

  • No AI summaries in v1. Output is source-faithful data only, so nothing in the dataset is generated or inferred.

  • principal-revised reports timeline rows. recordsTotal counts timeline rows, which is why records are de-duplicated by act.

  • 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.

  • Empty fields are honest. If AGC does not publish a commencement date or English title for a document, the field is empty rather than guessed.

  • Some documents have no PDF. A number of Federal Constitution amendments are published only as P.U. gazette references with no downloadable file. Those records keep a working sourceUrl and empty pdfEN / pdfBM.

  • PDF URLs use AGC's download gateway. pdfEN / pdfBM point at processFile.php?token=… rather than the raw file path, because the raw /ilims/upload/… path intermittently returns HTTP 500 while the gateway reliably returns the PDF. Treat these as download links, not as stable permanent URLs.

  • The portal refuses non-Malaysian IP ranges. lom.agc.gov.my serves Malaysian clients normally while resetting connections from foreign IP ranges. From an Apify container, from a home connection outside Malaysia, and through a third-party rendering proxy, the TLS connection is reset and the Actor reports fetch failed.

    How to tell an outage from a block — the portal was confirmed up (serving gazettes published that day) while every subpage request was reset:

    ProbeResult
    Public DNS for lom.agc.gov.myresolves normally
    TCP connect to the resolved IP, port 443connection times out
    Third-party renderer fetching the homepagesucceeds (cached edge)
    Third-party renderer fetching any subpageERR_CONNECTION_RESET

    A run on a blocked network now fails with an explicit message saying so, instead of silently reporting success with zero rows. Running it from a Malaysian network, or through a proxy with a Malaysian exit, is the only way to verify live collection.


Use cases

  • Legal-tech and compliance teams building a Malaysian statute database.
  • Law firms and in-house counsel tracking amendments and repeals.
  • Fintech, insurance and healthcare companies mapping sector regulation.
  • Researchers, journalists and NGOs analysing legislative output over time.
  • AI/RAG pipelines that need citable, current Malaysian legal sources with official PDFs.

Data source

Public data published by the Attorney General's Chambers of Malaysia — Laws of Malaysia portal. 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.


Project structure

src/ # Actor source (sources, lib, schemas)
tests/ # vitest suites + HTML/JSON fixtures
scripts/ # one-off helpers (capture-fixtures.mjs)
.actor/ # actor.json + dataset schema
PRICING.md # pay-per-event pricing model
REPORT.md # build & verification checklist

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.