Singapore Law Data — Singapore Statutes Online avatar

Singapore Law Data — Singapore Statutes Online

Pricing

from $2.50 / 1,000 legislation records

Go to Apify Store
Singapore Law Data — Singapore Statutes Online

Singapore Law Data — Singapore Statutes Online

Singapore statutes and subsidiary legislation from the official AGC Singapore Statutes Online portal: 6,300+ in-force records with title, Act number, status, year and official PDF links. Pay-per-event.

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

Singapore Law Data — Singapore Statutes Online (SSO)

Scrape Singapore legislation from the official Attorney-General's Chambers portal — Singapore Statutes Online — into clean, structured JSON.

Every record is normalised to the same schema, whether it came from the Acts collection or the Subsidiary Legislation collection: title, official document code, status, year, reference date, and a direct link to the official PDF published by AGC.

No API key. No proxies. The portal is protected by an AWS WAF JavaScript challenge, which this Actor solves once with a real browser and then reuses for every subsequent request.


What you get

WhatDetail
Coverage~6,380 documents: 524 Acts + ~5,860 Subsidiary Legislation items, all currently in force
Stable schemaOne row shape for both collections — no per-source field guessing
Official codescode carries the SSO document reference, e.g. AA2004, AA2004-R5, SCJA1969-N2
Official PDFspdfUrl points at the AGC-hosted PDF for that document
DatesreferenceDate normalised to ISO-8601
Statusin_force for everything in the v1 scope
Deterministic idsid = <collection>:<code>, 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. Both are included by default.

collections valueWhat it contains≈ Records
actsActs currently in force524
slSubsidiary Legislation currently in force5.860

Counts are reported by the source at build time (2026-11), minus browse-table navigation rows that carry no document link. The portal grows; treat them as a guide.


Input

FieldTypeDefaultDescription
collectionsarray["acts","sl"]Collections to scrape.
maxItemsinteger100Max records written this run. Hard cap 25000.
includeRawbooleanfalseAttach the untouched source row under raw.
resumebooleantrueContinue from where the previous identical run stopped.

Example: just the Acts

{
"collections": ["acts"],
"maxItems": 526
}

Example: a full corpus snapshot

{
"collections": ["acts", "sl"],
"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": "act:AA2004",
"collection": "act",
"collectionLabel": "Acts",
"docType": "Act",
"code": "AA2004",
"title": "Accountants Act 2004",
"status": "in_force",
"year": 2004,
"referenceDate": "2004-01-01",
"language": "en",
"country": "SG",
"sourceUrl": "https://sso.agc.gov.sg/Act/AA2004",
"pdfUrl": "https://sso.agc.gov.sg/Act/AA2004?ViewType=Pdf",
"collectedAt": "2026-11-15T09:14:03.118Z"
}
FieldTypeNotes
idstring<collection>:<code> — stable, unique per document
collectionstringact or sl
collectionLabelstringHuman-readable collection name
docTypestringAct or Subsidiary Legislation
codestringOfficial SSO document reference, e.g. AA2004
titlestringOfficial short title
statusstringin_force in v1
yearintegerDerived from the reference date, falling back to the document code
referenceDatestringISO-8601 date of the source document reference, when provided
languagestringAlways en — SSO is English-only
countrystringAlways SG
sourceUrlstringOfficial SSO page for the document
pdfUrlstringOfficial SSO PDF link
collectedAtstringISO-8601 run timestamp
rawobjectUntouched source row, 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 (~6,380 records) ≈ $16

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 collection with no records 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.0020, Gold $0.0018, Platinum $0.0016, Diamond $0.0014. 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 6,380-record corpus in one go ($16).


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/BU3SQVyId7cdqu1hR/runs?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"input":{"collections":["sl"],"maxItems":50}}'
# RIGHT - flat body
curl -X POST "https://api.apify.com/v2/acts/BU3SQVyId7cdqu1hR/runs?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"collections":["sl"],"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. Launches headless Chromium with a stealth fingerprint (no navigator.webdriver, realistic plugin and locale profile).
  2. Solves the AWS WAF JavaScript challenge once and captures the issued token and cookies.
  3. Reuses that browser context's HTTP client (context.request) for every subsequent request — navigating with page.goto per request burns the portal's rate-limit budget and triggers HTTP 467.
  4. Walks the SSO browse endpoints with 0-based page indexes in the path (/Browse/Act/Current/All/0) and a PageSize of 500.
  5. Parses each browse table, normalises every row to the public schema, and resolves the document code, title and PDF link.
  6. Pushes the page to the dataset, then charges for exactly those records.
  7. 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. HTTP 467 (rate limited) is retried with exponential backoff; HTTP 403 triggers a fresh browser context with a matching user agent.


Limitations

  • In-force documents only. v1 covers Acts and Subsidiary Legislation currently in force. Revised editions (-R5), supplements, repealed or revoked documents, court judgments and the Singapore Gazette are not included — they are planned for v2.
  • Metadata and PDF links only. v1 does not download or chunk document text. The pdfUrl is the official PDF; fetch and parse it yourself if you need full text.
  • English only. SSO publishes English only, so there is no bilingual value to extract. language is always en.
  • PDF links require the same WAF token. pdfUrl resolves normally from a normal browser session; automated fetches with no WAF token may receive HTTP 202 (challenge) instead of the PDF.
  • Rate limiting is real. Aggressive concurrent runs from the same IP can receive HTTP 467. The Actor backs off and retries, but a single run remains the safest way to consume this source.
  • 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.resumeState tells you which mode was used.
  • Empty fields are honest. If SSO does not publish a reference date for a document, the field is empty rather than guessed.

Use cases

  • Legal-tech and compliance teams building a Singapore statute database.
  • Law firms and in-house counsel tracking subsidiary legislation and its parent Acts.
  • Fintech, insurance and healthcare companies mapping sector regulation.
  • Researchers, journalists and NGOs analysing legislative output over time.
  • AI/RAG pipelines that need citable, current Singapore legal sources with official PDF links.

Data source

Public data published by the Attorney-General's Chambers of Singapore — Singapore Statutes Online. 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.