API Reference
Parliament.bg API Reference
Comprehensive documentation for all parliament.bg APIs used in the scraper with detailed request/response examples.
📚 API Overview
The parliament.bg APIs provide access to parliamentary data including members, committees, bills, transcripts, and meeting videos. All APIs return JSON data and use HTTP GET requests.
Base URLs
- API Base:
https://www.parliament.bg/api/v1/
- Static Resources:
https://www.parliament.bg/
Authentication
No authentication is required for these public APIs.
👥 Parliament Members API
Get All Parliament Members
Endpoint: GET /coll-list-ns/bg
curl "https://www.parliament.bg/api/v1/coll-list-ns/bg"
Response Structure:
{
"colListMP": [
{
"A_ns_MP_id": 12345,
"A_ns_MPL_Name1": "FirstName",
"A_ns_MPL_Name2": "MiddleName",
"A_ns_MPL_Name3": "LastName",
"A_ns_Va_name": "Electoral District Name",
"A_ns_CL_value_short": "Political Party Abbreviation"
}
]
}
Field Descriptions:
A_ns_MP_id
: Unique parliament member identifierA_ns_MPL_Name1/2/3
: First, middle, and last namesA_ns_Va_name
: Electoral district representationA_ns_CL_value_short
: Political party abbreviation
Get Member Profile Details
Endpoint: GET /mp-profile/bg/{member_id}
curl "https://www.parliament.bg/api/v1/mp-profile/bg/12345"
Response Structure:
{
"A_ns_MP_Email": "member@parliament.bg",
"A_ns_MP_Phone": "+359 2 xxx xxxx",
"A_ns_MP_Fax": "+359 2 xxx xxxx",
"prsList": [
{
"A_ns_MP_Pr_TL_value": "Profession Name"
}
]
}
Field Descriptions:
A_ns_MP_Email
: Official parliament emailA_ns_MP_Phone/Fax
: Contact informationprsList
: Array of professional backgrounds
🏢 Committees API
Get All Committees
Endpoint: GET /coll-list/bg/3
curl "https://www.parliament.bg/api/v1/coll-list/bg/3"
Response Structure:
[
{
"A_ns_C_id": 3613,
"A_ns_CT_id": 3,
"A_ns_CL_value": "Committee Name in Bulgarian",
"A_ns_C_active_count": 15,
"A_ns_C_date_F": "2021-04-15",
"A_ns_CDend": "9999-12-31"
}
]
Field Descriptions:
A_ns_C_id
: Unique committee identifierA_ns_CT_id
: Committee type ID (3 = standing committee)A_ns_CL_value
: Committee name in BulgarianA_ns_C_active_count
: Number of active membersA_ns_C_date_F
: Committee formation dateA_ns_CDend
: Committee end date (9999-12-31 = active)
Get Committee Details with Members
Endpoint: GET /coll-list-mp/bg/{committee_id}/3?date=
curl "https://www.parliament.bg/api/v1/coll-list-mp/bg/3613/3?date="
Response Structure:
{
"A_ns_C_id": 3613,
"A_ns_CT_id": 3,
"A_ns_CL_value": "Committee Name",
"A_ns_C_active_count": 15,
"A_ns_C_date_F": "2021-04-15",
"A_ns_CDend": "9999-12-31",
"A_ns_CDemail": "committee@parliament.bg",
"A_ns_CDroom": "Room 356",
"A_ns_CDphone": "+359 2 xxx xxxx",
"A_ns_CDrules": "Committee rules and regulations text",
"colListMP": [
{
"A_ns_MP_id": 12345,
"A_ns_MP_PosL_value": "председател",
"A_ns_MSP_date_F": "2021-04-15",
"A_ns_MSP_date_T": "9999-12-31"
}
]
}
Field Descriptions:
A_ns_CDemail
: Committee email addressA_ns_CDroom
: Committee room numberA_ns_CDphone
: Committee phone numberA_ns_CDrules
: Committee rules textcolListMP
: Array of committee membersA_ns_MP_PosL_value
: Position (председател, зам.-председател, член)A_ns_MSP_date_F/T
: Member term start/end dates
📄 Bills API
Get Bills by Committee
Endpoint: GET /com-acts/bg/{committee_id}/1
curl "https://www.parliament.bg/api/v1/com-acts/bg/3613/1"
Response Structure:
[
{
"L_Act_id": 98765,
"L_ActL_title": "Bill Title in Bulgarian",
"L_Act_sign": "51-554-01-114",
"L_Act_date": "2024-01-15",
"path": "/category/subcategory",
"L_SesL_value": "51st Parliamentary Session"
}
]
Field Descriptions:
L_Act_id
: Unique bill identifierL_ActL_title
: Bill title in BulgarianL_Act_sign
: Official bill signature/numberL_Act_date
: Bill submission datepath
: Bill category pathL_SesL_value
: Parliamentary session
Get Detailed Bill Information
Endpoint: GET /bill/{bill_id}
curl "https://www.parliament.bg/api/v1/bill/98765"
Response Structure:
{
"L_Act_sign": "51-554-01-114",
"L_SesL_value": "51st Parliamentary Session",
"A_ns_folder": "51",
"withdrawn": false,
"imp_list": [
{
"A_ns_MPL_Name1": "FirstName",
"A_ns_MPL_Name2": "MiddleName",
"A_ns_MPL_Name3": "LastName",
"A_ns_CL_value_short": "Party"
}
],
"dist_list": [
{
"A_ns_CL_value": "Committee Name",
"L_Act_DTL_value": "Main Committee"
}
],
"file_list": [
{
"FILENAME": "bill-document.pdf",
"FILEPATH": "/bills/51/",
"FILESIZE": "1.2 MB"
}
]
}
Field Descriptions:
withdrawn
: Whether bill was withdrawnimp_list
: Array of bill submittersdist_list
: Array of committees handling the billfile_list
: Array of associated documents
📜 Transcripts API
Get Transcript List for Period
Endpoint: GET /archive-period/bg/A_Cm_Steno/{year}/{month}/{committee_id}/0
curl "https://www.parliament.bg/api/v1/archive-period/bg/A_Cm_Steno/2024/8/3613/0"
Response Structure:
[
{
"t_id": 67890,
"t_label": "Meeting Type Label",
"t_date": "2024-08-15",
"t_time": "10:00",
"t_status": "published"
}
]
Field Descriptions:
t_id
: Unique transcript identifiert_label
: Type of meeting/transcriptt_date
: Meeting datet_time
: Meeting start timet_status
: Publication status
Get Transcript Content
Endpoint: GET /com-steno/bg/{transcript_id}
curl "https://www.parliament.bg/api/v1/com-steno/bg/67890"
Response Structure:
{
"A_Cm_St_text": "<html>Full transcript HTML content with speakers and discussions</html>",
"A_Cm_St_date": "2024-08-15",
"A_Cm_St_sub": "Meeting Type",
"A_Cm_Stid": 67890,
"A_ns_C_id": 3613,
"acts": [
{
"act_id": 123,
"act_title": "Related Act Title"
}
]
}
Field Descriptions:
A_Cm_St_text
: Full HTML content of transcriptA_Cm_St_date
: Meeting dateA_Cm_St_sub
: Meeting subject/typeA_Cm_Stid
: Transcript IDA_ns_C_id
: Committee IDacts
: Array of related acts/bills discussed
🎥 Meeting Videos API
Get Meeting List for Period
Endpoint: GET /archive-period/bg/A_Cm_Sit/{year}/{month}/{committee_id}/0
curl "https://www.parliament.bg/api/v1/archive-period/bg/A_Cm_Sit/2025/7/3613/0"
Response Structure:
[
{
"t_id": 13565,
"t_label": "Committee Meeting",
"t_date": "2025-07-03",
"t_time": "14:45"
}
]
Field Descriptions:
t_id
: Meeting identifier (use for detailed meeting data)t_label
: Meeting typet_date
: Meeting datet_time
: Meeting time
Get Meeting Details with Video URLs
Endpoint: GET /com-meeting/bg/{meeting_id}
curl "https://www.parliament.bg/api/v1/com-meeting/bg/13565"
Response Structure:
{
"A_Cm_Sitid": 13565,
"A_ns_C_id": 3613,
"A_Cm_Sit_date": "2025-07-03 14:45:00",
"A_Cm_Sit_room": "356",
"A_Cm_Sit_body": "Meeting agenda and details",
"video": {
"Vidate": "2025-07-03",
"Vicount": 1,
"Vifile": "autorecord/2025-07-03/20250703-17-21258-3613_",
"videoArchive": 1,
"default": "/Gallery/videoCW/autorecord/2025-07-03/20250703-17-21258-3613_Part1.mp4",
"playlist": [
{
"item": 1,
"file": "/Gallery/videoCW/autorecord/2025-07-03/20250703-17-21258-3613_Part1.mp4"
}
]
}
}
Field Descriptions:
A_Cm_Sitid
: Meeting IDA_ns_C_id
: Committee IDA_Cm_Sit_date
: Meeting date and timeA_Cm_Sit_room
: Meeting roomvideo.Vidate
: Video recording datevideo.Vicount
: Number of video partsvideo.Vifile
: Video file prefixvideo.default
: Default video URLvideo.playlist
: Array of video files
🎬 Video File URL Patterns
Multi-part Video Files
Pattern: /Gallery/videoCW/{vifile}Part{i}.mp4
# Example URLs
https://www.parliament.bg/Gallery/videoCW/autorecord/2025-07-03/20250703-17-21258-3613_Part1.mp4
https://www.parliament.bg/Gallery/videoCW/autorecord/2025-07-03/20250703-17-21258-3613_Part2.mp4
Auto-recorded Video Files
Pattern: /Gallery/videoCW/autorecord/{date}/{formatted_date}-{meeting_id}-{committee_id}_Part{i}.mp4
# Example URL structure
https://www.parliament.bg/Gallery/videoCW/autorecord/2025-07-03/20250703-17-21258-3613_Part1.mp4
URL Components:
date
: Meeting date (YYYY-MM-DD)formatted_date
: Date without separators (YYYYMMDD)meeting_id
: Unique meeting identifiercommittee_id
: Committee identifierPart{i}
: Video part number
📋 PDF Documents API
Bill PDF Documents
Pattern: /bills/{session}/{signature}.pdf
# Example URL
https://www.parliament.bg/bills/51/51-554-01-114.pdf
URL Components:
session
: Parliamentary session foldersignature
: Bill signature/number
⚠️ Rate Limiting & Best Practices
Recommended Practices
- Timeout Settings: Use 30-60 second timeouts for API calls
- Error Handling: Always check HTTP status codes
- Data Validation: Verify required fields exist in responses
- Retry Logic: Implement exponential backoff for failed requests
- Caching: Store frequently accessed data locally
Example Implementation
// Laravel HTTP Client example
$response = Http::timeout(60)
->retry(3, 1000) // 3 retries with 1 second delay
->get("https://www.parliament.bg/api/v1/coll-list-ns/bg");
if ($response->successful()) {
$data = $response->json();
// Process data
} else {
// Handle error
logger()->error("API request failed", [
'url' => $response->effectiveUri(),
'status' => $response->status(),
'body' => $response->body()
]);
}
🔍 Common Response Codes
Success Codes
- 200 OK: Request successful, data returned
- 304 Not Modified: Data hasn’t changed (if using caching headers)
Error Codes
- 404 Not Found: Resource doesn’t exist (invalid ID)
- 500 Internal Server Error: Server-side error
- 503 Service Unavailable: Server temporarily unavailable
📊 Data Formats & Types
Date Formats
- API Dates:
YYYY-MM-DD
orYYYY-MM-DD HH:MM:SS
- Video Dates:
YYYY-MM-DD
in URLs,YYYYMMDD
in filenames
Text Encoding
- Character Set: UTF-8
- Language: Bulgarian (Cyrillic script)
- HTML Content: Transcripts contain HTML markup
Null Values
- Missing fields may be
null
or omitted entirely - Always check field existence before accessing
🛠️ Testing APIs
Using cURL
# Test basic connectivity
curl -I "https://www.parliament.bg/api/v1/coll-list-ns/bg"
# Get formatted JSON response
curl -s "https://www.parliament.bg/api/v1/coll-list/bg/3" | jq '.'
# Test specific committee
curl -s "https://www.parliament.bg/api/v1/coll-list-mp/bg/3613/3?date=" | jq '.A_ns_CL_value'
Using Browser Developer Tools
- Open browser developer tools (F12)
- Go to Network tab
- Visit parliament.bg committee pages
- Filter by XHR requests to see API calls
- Copy request URLs for testing
📈 Usage Examples in Parliament Scraper
Committee Processing Example
// Get all committees
$committees = Http::get('https://www.parliament.bg/api/v1/coll-list/bg/3')->json();
foreach ($committees as $committee) {
$committeeId = $committee['A_ns_C_id'];
// Get detailed committee info with members
$details = Http::get("https://www.parliament.bg/api/v1/coll-list-mp/bg/{$committeeId}/3?date=")->json();
// Process members
foreach ($details['colListMP'] as $member) {
$memberId = $member['A_ns_MP_id'];
$position = $member['A_ns_MP_PosL_value'];
// Store relationship
}
}
Video Discovery Example
// Find meetings with videos for a committee
$year = 2025;
$month = 7;
$committeeId = 3613;
$meetings = Http::get("https://www.parliament.bg/api/v1/archive-period/bg/A_Cm_Sit/{$year}/{$month}/{$committeeId}/0")->json();
foreach ($meetings as $meeting) {
$meetingId = $meeting['t_id'];
// Get meeting details with video URLs
$meetingData = Http::get("https://www.parliament.bg/api/v1/com-meeting/bg/{$meetingId}")->json();
if (isset($meetingData['video'])) {
$videoUrl = 'https://www.parliament.bg' . $meetingData['video']['default'];
// Process video for transcription
}
}