Discover/Diariodarepublica API
live

Diariodarepublica APIdiariodarepublica.pt

Retrieve acts, decrees, and legislation from Portugal's Official Gazette via 3 endpoints. Access Serie I and Serie II publications by date.

Endpoint health
verified 20h ago
get_acts_by_date
get_serie1_acts
get_serie2_acts
2/3 passing latest checkself-healing
Endpoints
3
Updated
26d ago

What is the Diariodarepublica API?

The Diário da República API provides access to Portugal's Official Gazette through 3 endpoints, returning structured data on laws, decree-laws, resolutions, appointments, and administrative notices. The get_acts_by_date endpoint combines both publication series into a single response with per-series counts, while get_serie1_acts and get_serie2_acts let you query each series independently. Each act object includes fields like db_id, title, type, emitter, summary, and publication_date.

Try it
Publication date in YYYY-MM-DD format.
api.parse.bot/scraper/2fc3485c-f895-45a1-83b1-4998d1a47ab9/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/2fc3485c-f895-45a1-83b1-4998d1a47ab9/get_serie1_acts?date=2026-07-03' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace diariodarepublica-pt-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Diário da República SDK — retrieve Portuguese Official Gazette publications."""
from parse_apis.diário_da_república_api import DiarioRepublica, DateFormatInvalid

client = DiarioRepublica()

# Fetch Serie I primary legislation for a specific date
for act in client.serie1results.get_by_date(date="2024-12-02", limit=3):
    print(act.title, act.type, act.emitter)

# Fetch Serie II administrative acts/diario issues
for act in client.serie2results.get_by_date(date="2024-12-02", limit=3):
    print(act.title, act.serie)

# Get combined daily results from both series
result = client.dailyresults.get_by_date(date="2024-12-02", limit=1).first()
if result:
    print(result.title, result.publication_date, result.serie)

# Typed error handling for invalid date format
try:
    client.serie1results.get_by_date(date="not-a-date", limit=1).first()
except DateFormatInvalid as exc:
    print(f"Invalid date: {exc}")

print("exercised: serie1results.get_by_date / serie2results.get_by_date / dailyresults.get_by_date")
All endpoints · 3 totalmissing one? ·

Get all Serie I (1ª Série) acts published on a specific date. Serie I contains laws, decree-laws, resolutions, and other primary legislation. Returns the list of acts with metadata including type, emitter, summary, and associated Diário issue. Dates without publications return an empty acts array.

Input
ParamTypeDescription
daterequiredstringPublication date in YYYY-MM-DD format.
Response
{
  "type": "object",
  "fields": {
    "acts": "array of act objects with db_id, title, number, type, emitter, summary, publication_date, part, diario_title, diario_id, serie",
    "date": "string - requested publication date",
    "serie": "string - always 'I'",
    "total_acts": "integer - number of acts found",
    "total_diarios": "integer - number of Diário issues for the date"
  },
  "sample": {
    "data": {
      "acts": [
        {
          "part": "",
          "type": "Lei",
          "db_id": "898553932",
          "serie": "I",
          "title": "Lei n.º 43/2024",
          "number": "43/2024",
          "emitter": "Assembleia da República",
          "summary": "Altera a Lei n.º 30/2021, de 21 de maio.",
          "diario_id": "898553919",
          "diario_title": "Diário da República n.º 233/2024, de 2 de dezembro de 2024",
          "publication_date": "2024-12-02"
        }
      ],
      "date": "2024-12-02",
      "serie": "I",
      "total_acts": 4,
      "total_diarios": 1
    },
    "status": "success"
  }
}

About the Diariodarepublica API

What the API Returns

All three endpoints are date-driven, accepting a date parameter in YYYY-MM-DD format. get_serie1_acts returns an array of act objects from Serie I (1ª Série), which covers primary legislation: laws, decree-laws, resolutions of the Council of Ministers, and similar instruments. Each act carries fields including number, type, emitter, summary, part, diario_title, diario_id, and serie. The response also surfaces total_acts and total_diarios counts for the requested date.

Serie II and Combined Queries

get_serie2_acts targets Serie II (2ª Série), which holds administrative acts, public appointments, procurement notices, and other secondary publications. The response includes a diarios array of issue-level metadata (each with db_id, title, date, and number) alongside any detailed act objects available for that date. For a full-day picture, get_acts_by_date merges both series, returning a unified acts array with serie1_count and serie2_count breakdown fields alongside total_acts.

Coverage and Data Shape

Publication dates follow the official Diário da República release calendar; not every calendar date has a corresponding issue. When no acts are published for a given date in a series, the relevant count fields return zero and the arrays are empty. The emitter field identifies the government body or entity responsible for each act, which is useful for filtering output by ministry or public authority.

Reliability & maintenanceVerified

The Diariodarepublica API is a managed, monitored endpoint for diariodarepublica.pt — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when diariodarepublica.pt changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official diariodarepublica.pt API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
20h ago
Latest check
2/3 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Track new legislation by polling get_serie1_acts daily and filtering by type for decree-laws or resolutions
  • Monitor public appointment notices in Serie II for a specific government body using the emitter field
  • Build a legislation alert system that flags acts from a specific ministry by matching emitter across dates
  • Aggregate a historical archive of Portuguese law by iterating get_acts_by_date across a date range
  • Audit procurement and administrative notices by extracting diarios metadata from get_serie2_acts
  • Compare legislative output volume over time using serie1_count and serie2_count from get_acts_by_date
  • Populate a legal research tool with act summary and title fields for full-text indexing
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Diário da República have an official developer API?+
Yes. The Portuguese official gazette publishes a developer API and data portal at https://dados.gov.pt and through the DRE platform at https://diariodarepublica.pt/dr/api. This Parse API provides a structured, consistent interface over the same publication data.
What does `get_serie1_acts` return that `get_acts_by_date` does not?+
get_serie1_acts returns total_diarios — the number of distinct Diário issues published on that date for Serie I — which is not present in the combined get_acts_by_date response. It also keeps Serie I acts isolated, which is useful if you only need primary legislation and want to avoid processing Serie II noise.
Can I search acts by keyword, emitter, or act type rather than by date?+
Not currently. All three endpoints require a date parameter and return all acts for that date. Filtering by emitter, type, or keyword must be done client-side after fetching results. You can fork this API on Parse and revise it to add a search or filter endpoint targeting those fields.
Are acts from dates before a certain year available?+
The API reflects what the Diário da República platform exposes for a given date. Historical availability depends on the source platform's digitization coverage, which is more complete for recent decades. Older publications may return empty results for some dates. You can fork this API on Parse and revise it to surface or note coverage boundaries explicitly.
Does the API return the full text of each act?+
No. Act objects include a summary field and key metadata (title, number, type, emitter, diario_title), but not the complete legislative text. Full-text content is not currently exposed. You can fork this API on Parse and revise it to add an endpoint that retrieves the full body of a specific act by db_id.
Page content last updated . Spec covers 3 endpoints from diariodarepublica.pt.
Related APIs in Government PublicSee all →
boe.es API
Access Spain's official government publications to retrieve daily legislative summaries, browse consolidated laws, and view detailed legal documents with their full text and metadata. Stay informed about new regulations and find specific legislation through comprehensive search and retrieval of official state gazette content.
eur-lex.europa.eu API
Access and explore the complete collection of European Union laws, regulations, and Official Journal publications through a comprehensive database that lets you search documents, retrieve full texts, summaries, and metadata, and track legislative procedures and national implementations. Find exactly what you need with detailed search capabilities and get detailed information about how EU laws are transposed into national legislation.
monitoruloficial.ro API
Access the Romanian Official Gazette to retrieve published issues by date, browse legislative modifications, search professional announcements, and find products in the online bookstore. Check the eMonitor calendar and search across the entire portal to stay updated on official Romanian government publications and legal changes.
transparenciaportal.gov.br API
Track and analyze Brazilian government spending by accessing detailed records on politician amendments, public servant salaries, beneficiary payments, and government payment card transactions. Monitor how public funds are allocated across different government bodies and identify spending patterns through comprehensive financial data from Brazil's official transparency portal.
normattiva.it API
Search and retrieve Italian laws and legislative acts from the official Normattiva portal with advanced filtering, full text access with preserved article structure, and autocomplete suggestions. Quickly find specific legislation, browse complete legal texts, and explore Italian law with intelligent search capabilities.
indiacode.nic.in API
Search and retrieve Indian legislation from indiacode.nic.in. Browse Central and State Acts, look up individual sections, and extract fully structured act content by keyword or handle ID.
portaltransparencia.gov.br API
Search and analyze Brazilian government spending, including public expenses, contracts, civil servant salaries, benefits, travel records, and sanctions data. Track government transparency information by department, budget programs, and public tenders all in one place.
egazette.nic.in API
Access official Indian gazette publications including recent Extraordinary and Weekly gazettes, browse them by category, and explore the complete directory of available documents. Quickly find and retrieve the latest government publications all in one place.