Discover/cdep API
live

cdep APIcdep.ro

Access Romanian legislative initiatives via the cdep.ro API. List bills by year and chamber, retrieve sponsors, status, summaries, and introduction dates.

Endpoints
2
Updated
2mo ago

What is the cdep API?

The cdep.ro API exposes Romanian Chamber of Deputies legislative data through 2 endpoints, covering both bill listings and detailed initiative records. Use list_initiatives to retrieve all proposals registered in a given year for either the Senate or Chamber of Deputies, and get_initiative_details to pull structured fields like title, status, sponsors, and date introduced for any specific bill identified by its idp parameter.

Try it
Year of registration
Legislative chamber (1 = Senate, 2 = Chamber of Deputies)
api.parse.bot/scraper/00f13c84-43c8-4cec-a51d-93e445c77769/<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/00f13c84-43c8-4cec-a51d-93e445c77769/list_initiatives' \
  -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 cdep-ro-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.

"""
Romanian Parliament (cdep.ro) Legislative Initiatives Scraper
Get your API key from: https://parse.bot/settings
"""

import os
import requests
from typing import Optional


class ParseClient:
    """Client for the Romanian Parliament (cdep.ro) legislative initiatives API."""
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the Parse API client."""
        self.base_url = "https://api.parse.bot"
        self.scraper_id = "505f50bc-e7ef-4ed8-a049-c23e3e1e5387"
        self.api_key = api_key or os.getenv("PARSE_API_KEY")
        
        if not self.api_key:
            raise ValueError("API key not provided. Set PARSE_API_KEY environment variable.")
    
    def _call(self, endpoint: str, method: str = "POST", **params) -> dict:
        """
        Call a Parse API endpoint.
        
        Args:
            endpoint: The API endpoint name
            method: HTTP method (GET or POST)
            **params: Query or body parameters
            
        Returns:
            JSON response as dictionary
        """
        url = f"{self.base_url}/scraper/{self.scraper_id}/{endpoint}"
        headers = {
            "X-API-Key": self.api_key,
            "Content-Type": "application/json"
        }
        
        if method == "GET":
            response = requests.get(url, headers=headers, params=params)
        elif method == "POST":
            response = requests.post(url, headers=headers, json=params)
        else:
            raise ValueError(f"Unsupported HTTP method: {method}")
        
        response.raise_for_status()
        return response.json()
    
    def list_initiatives(self, chamber: Optional[str] = None, year: Optional[str] = None) -> dict:
        """
        List legislative initiatives for a specific year and chamber.
        
        Args:
            chamber: Legislative chamber (1 = Senate, 2 = Chamber of Deputies). Default: 2
            year: Year of registration. Default: 2024
            
        Returns:
            Dictionary with initiatives list
        """
        params = {}
        if chamber is not None:
            params["chamber"] = chamber
        if year is not None:
            params["year"] = year
        
        return self._call("list_initiatives", method="GET", **params)
    
    def get_initiative_details(self, idp: str) -> dict:
        """
        Get detailed information for a specific legislative initiative.
        
        Args:
            idp: Internal identifier of the project
            
        Returns:
            Dictionary with initiative details
        """
        return self._call("get_initiative_details", method="GET", idp=idp)


def main():
    """Demonstrate a practical workflow with the Romanian Parliament API."""
    client = ParseClient()
    
    print("=" * 80)
    print("Romanian Parliament Legislative Initiatives Scraper")
    print("=" * 80)
    
    # Step 1: List initiatives from 2024 (Chamber of Deputies, default)
    print("\n1. Fetching legislative initiatives from 2024...")
    initiatives_response = client.list_initiatives(year="2024", chamber="2")
    
    year = initiatives_response.get("year", "2024")
    total_count = initiatives_response.get("count", 0)
    initiatives = initiatives_response.get("initiatives", [])
    
    print(f"   Found {total_count} initiative(s) from {year}")
    
    if not initiatives:
        print("   No initiatives found.")
        return
    
    # Step 2: Process each initiative
    print(f"\n2. Processing {min(3, len(initiatives))} initiatives (showing first 3)...")
    for i, initiative in enumerate(initiatives[:3], 1):
        idp = initiative.get("idp")
        title = initiative.get("title", "N/A")
        status = initiative.get("status", "N/A")
        date_intro = initiative.get("date_introduced", "N/A")
        reg_num = initiative.get("registration_number", "N/A")
        
        print(f"\n   Initiative {i}:")
        print(f"   - ID: {idp}")
        print(f"   - Title: {title}")
        print(f"   - Registration #: {reg_num}")
        print(f"   - Introduced: {date_intro}")
        print(f"   - Status: {status}")
        
        # Step 3: Get detailed information for each initiative
        if idp:
            try:
                print(f"   - Fetching details...")
                details = client.get_initiative_details(idp=idp)
                
                sponsors = details.get("sponsors", [])
                summary = details.get("summary", "N/A")
                url = details.get("url", "N/A")
                detail_status = details.get("status", status)
                
                print(f"     Sponsors: {', '.join(sponsors) if sponsors else 'None listed'}")
                print(f"     URL: {url}")
                print(f"     Summary: {summary[:100]}..." if len(summary) > 100 else f"     Summary: {summary}")
                
            except Exception as e:
                print(f"     Error fetching details: {str(e)}")
    
    # Summary
    print("\n" + "=" * 80)
    print(f"Summary: Successfully retrieved {min(3, len(initiatives))} initiatives from {year}")
    print("=" * 80)


if __name__ == "__main__":
    main()
All endpoints · 2 totalmissing one? ·

List legislative initiatives for a specific year and chamber.

Input
ParamTypeDescription
yearstringYear of registration
chamberstringLegislative chamber (1 = Senate, 2 = Chamber of Deputies)
Response
{
  "type": "object",
  "fields": {
    "year": "string",
    "count": "integer",
    "initiatives": "array"
  },
  "sample": {
    "year": "2024",
    "count": 1,
    "initiatives": [
      {
        "idp": "22238",
        "title": "Proiect de Lege pentru modificarea şi completarea Legii nr.227/2015 privind Codul fiscal",
        "status": "în lucru la comisiile permanente ale Camerei Deputaţilor",
        "date_introduced": "15.01.2024",
        "registration_number": "PL-x 1/2024"
      }
    ]
  }
}

About the cdep API

What the API Covers

The cdep.ro API gives programmatic access to legislative initiatives published on the official Romanian Chamber of Deputies website. The list_initiatives endpoint accepts a year and a chamber parameter — 1 for the Senate, 2 for the Chamber of Deputies — and returns the total count of matched proposals alongside an initiatives array for that session. This lets you build year-over-year comparisons or monitor legislative activity across both chambers.

Initiative Detail Records

Once you have an idp identifier from the list endpoint, pass it to get_initiative_details to retrieve a full record. The response includes the bill's title, current status, a human-readable summary, the date_introduced, a sponsors array listing the individuals or groups who introduced the bill, and a direct url back to the official cdep.ro page. These fields are sufficient to track a bill's lifecycle from introduction through its current parliamentary state.

Reliability Notes

The cdep.ro site periodically experiences availability issues. The API includes retry logic so transient outages at the source do not immediately surface as errors to your application. Responses reflect the data as currently published on the official site; the API does not maintain a separate historical archive beyond what cdep.ro itself exposes.

Reliability & maintenance

The cdep API is a managed, monitored endpoint for cdep.ro — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when cdep.ro 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 cdep.ro 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.

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 which sponsors have introduced the most bills in a given parliamentary year using the sponsors field.
  • Build a legislative calendar by querying list_initiatives for each year and sorting by date_introduced.
  • Monitor status changes on specific bills by polling get_initiative_details with stored idp values.
  • Compare legislative volume between the Senate and Chamber of Deputies using the chamber parameter and count field.
  • Aggregate bill summaries for legal research or policy analysis by collecting the summary field across many initiatives.
  • Generate citation links to official cdep.ro bill pages using the url field returned by get_initiative_details.
  • Filter active versus historical proposals by combining year filtering with the status field.
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 cdep.ro have an official developer API?+
No. The Romanian Chamber of Deputies website at cdep.ro does not publish an official public developer API or documented data feed for legislative initiatives.
What does the `chamber` parameter control in `list_initiatives`?+
Pass 1 to scope results to Senate-registered initiatives and 2 for those registered in the Chamber of Deputies. Omitting the parameter returns initiatives without chamber filtering, depending on the site's default behavior. The response always includes the matched count and the full initiatives array for that selection.
Does the API return the full text or PDF of a bill?+
Not currently. The API returns structured metadata — title, status, summary, sponsors, date_introduced, and a url — but not the raw legislative text or attached document files. The url field points to the official cdep.ro page where documents are typically linked. You can fork this API on Parse and revise it to add an endpoint that fetches and returns linked document content.
How current is the data returned by `get_initiative_details`?+
The status and other fields reflect what is currently published on the cdep.ro website at the time of the request. The API does not cache or store historical snapshots, so if cdep.ro updates a bill's status, subsequent calls will return the updated value. During source-site outages, the retry logic attempts to resolve the request but cannot serve data that the site itself is not delivering.
Can I retrieve committee assignments or voting records for a bill?+
Not currently. The API covers initiative metadata: title, status, summary, sponsors, introduction date, and source URL. Committee assignments and roll-call voting records are not included in the current response schema. You can fork this API on Parse and revise it to add endpoints targeting those data points if they are available on the cdep.ro bill detail pages.
Page content last updated . Spec covers 2 endpoints from cdep.ro.
Related APIs in Government PublicSee all →
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.
legiscan.com API
Track and monitor legislative bills across all US states, search by topic or bill number, and access full bill text and datasets to stay informed on current legislation. Get detailed information on bill status, sponsors, and voting records without needing authentication.
capitol.texas.gov API
Search and monitor Texas Legislature bills, track their progress through legislative stages, and retrieve detailed action histories. Look up legislator contact information, district details, committee assignments, and full committee membership rosters.
diariodarepublica.pt API
Search and retrieve official Portuguese legislation, decrees, and resolutions published in the Diário da República, organized by publication series and date. Browse acts from both Serie I and Serie II to stay updated on the latest government publications and legal announcements.
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.
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.
devgan.in API
Search and explore Indian legal acts like the IPC, BNS, and CrPC by browsing chapters, viewing detailed section information, and finding cross-references between different laws. Navigate through legislative classifications, search across acts, and access comprehensive details on specific sections all in one place.
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.