About Law Explorer

Sources
Portal das Finanças · legalize-pt
Updated
2026-11-18
Author
Format
HTML with links (HATEOAS)
Methods
GET · HEAD
Start
/

Where the laws come from

Law Explorer publishes a selected collection of Portuguese tax legislation as linked pages for people and software. The legal texts are in Portuguese. Each page records where its text came from; check the linked official source for authoritative wording and legal status.

We use two main sources:

–Autoridade Tributária e Aduaneira (AT), Portal das Finanças supplies the article text for the consolidated VAT Code (CIVA) and Personal Income Tax Code (CIRS), as well as the official VAT exemption-code table;

–legalize-pt supplies text snapshots for the other acts in this collection and revision history for the laws we track. It is a separate data repository, not an official publisher; its metadata helps us link cited acts to their publication in the Diário da República.

When we sync the pack, the updater reads CIVA and CIRS article pages from the AT portal and obtains the other acts and their commit history from legalize-pt. It stores article snapshots with their source URL, retrieval time and SHA-256 digest. The website is built from those local snapshots; the site build itself does not fetch legislation from the network. The digest checks the stored snapshot against its recorded hash.

The collection is selective, not a complete database of Portuguese law. Some legalize-pt texts are as originally enacted and are not consolidated with later amendments. Each article page links to its recorded source and shows available retrieval, revision and integrity details. Use the official source to confirm the current wording and status.

For agents: how to navigate

There is no JSON API: the HTML pages are the API. Start at / and follow links by their rel. Pages are static, so every link is one plain GET; you do not need JavaScript or a session.

Start

The <head> of each page lists where you can go from it. An article page:

GET /civa/6

<link rel="index" href="/">
<link rel="up" href="/civa/" title="Código do IVA (DL 394-B/84)">
<link rel="self" href="/civa/6">
<link rel="prev" href="/civa/5">
<link rel="next" href="/civa/6-A">
<link rel="history" href="/civa/6/history">
<link rel="describedby" href="https://info.portaldasfinancas.gov.pt/…/iva6.aspx">
<link rel="about" href="/about">

Link relations

relFound onLeads to
indexevery pagethe list of codes, /
selfevery pagethe page's own URL
uparticle, history, amendmentsthe parent page
itemcode index (body)each article of the code
prev, nextarticlethe neighbouring article
historyarticlerevisions of this article's text
feedcode indexamendments to the code
describedbyarticlethe official source (external)
version-sourcearticle (body)the legalize-pt commit (external)
citesarticle text (body)the cited act or provision
about, alternateevery page; this pagethis page; its other language
authorevery pagethe author, lapsh.in (external)

Citations

Each citation in the legal text says how far it was resolved in data-outcome. data-cite holds the identifier of the target on this site, and data-also the other provisions in a list such as "n.os 1 e 2".

<a href="#1" rel="cites"
   data-outcome="internal" data-cite="civa:6:1">número anterior</a>
<a href="/civa/1" rel="cites"
   data-outcome="internal-degraded" data-cite="civa:1">n.º 3 do artigo 1.º</a>
<a href="https://data.dre.pt/eli/dec-lei/104/1993/…" rel="external cites"
   data-outcome="external-dr">Decreto-Lei n.º 104/93</a>
<span data-outcome="unresolved"
   data-reason="parse-partial">Art. 2.º</span>
data-outcomeMeaning
internalThe exact provision on this site; the link points to its anchor.
internal-degradedThe article is on this site, but the provision could not be pinned; the link points to the article.
external-drThe act in the Diário da República (ELI link).
external-genericAnother external source.
unresolvedNot linked: a span with the reason in data-reason.

Identifiers

Identifiers are code:article, plus :provision for a paragraph. The provision part is also the fragment of its URL: civa:6:4.a is /civa/6#4.a, paragraph (a) of number 4.

<meta itemprop="identifier" content="civa:6">
<p class="law-alinea" id="4.a" itemscope>
  <meta itemprop="identifier" content="civa:6:4.a">

URLs

Following links is enough, but the URLs are stable, so you can also build them yourself:

/list of codes and acts
/civa/index of a code
/civa/6an article; 6-A for added articles
/civa/6/historyhistory of an article's text
/civa/amendmentsamendments to a code
/at/tax-exemption-codesAT's VAT exemption-code table
/reportcitation-resolution counts
/about, /en/aboutthis page

The server is read-only: it accepts GET and HEAD and answers 405 to anything else.