PDF files of House of Representatives Job and Internship Announcements
This repository contains tools for extracting, processing, and structuring job listings from the U.S. House of Representatives. See related blog post: https://thescoop.org/archives/2025/02/28/turning-congressional-job-listings-into-data/index.html
The House of Representatives regularly distributes PDF files containing job and internship announcements from members and committees. This project:
- Collects these PDF files
- Extracts the text content
- Processes the text using Large Language Models (LLMs)
- Produces structured JSON files with detailed information about each job listing
This is a public archive of those files.
PDF Files → Text Extraction → LLM Processing → Structured JSON
Weekly emails from the House of Representatives include PDF attachments with job and internship listings. These are archived in this repository.
The PDFs are converted to plain text files using pdftotext
, triggered by GitHub Actions. The extracted text files are stored in the output
directory with filenames that include the date of the listing.
Two parser implementations are provided:
The first approach:
- Processes entire text files at once
- Uses the Gemini 1.5 Flash model
- Formats output as a JSON array of job listings
- Handles basic text normalization
The improved implementation:
- Splits text into chunks based on job IDs (MEM-xxx-yy pattern)
- Processes each chunk separately
- Uses the Gemini 2.0 Flash model
- Implements more robust error handling
- Provides more comprehensive field extraction
- Includes better handling of non-ASCII characters and formatting
The final output is stored in JSON files with a structured format. Each job listing contains fields such as:
id
: Job ID in MEM-XXX-YY formatposition_title
: Full position titleoffice
: Congressional office or committee namelocation
: Primary work locationposting_date
: Date in YYYY-MM-DD formatdescription
: Full job descriptionresponsibilities
: Array of responsibilitiesqualifications
: Array of required qualificationshow_to_apply
: Application instructionssalary_info
: Salary informationcontact
: Contact informationequal_opportunity
: Equal opportunity statement
Here's an example of a parsed job listing:
{
"id": "MEM-458-24",
"office": "Congressman Steven Horsford",
"position_title": "District Representative",
"location": "North Las Vegas, Nevada",
"posting_date": "2024-11-04",
"responsibilities": [
"strengthening relationships with key stakeholders, as well as attending engagements on behalf of the Member",
"helping constituents resolve problems with federal agencies through written and verbal communication"
],
"qualifications": [
"Political knowledge and comfortable navigating complicated situations",
"Strong written, verbal, analytical, and organization skills; impeccable customer service manners; public speaking skills"
],
"job_type": "Full-time",
"salary_info": "Commensurate with experience",
"contact": "[email protected]",
"how_to_apply": "Submit resume and cover letter to [email protected]",
"description": "The Office of Congressman Steven Horsford seeks a District Representative to serve constituents in Nevada's 4th Congressional District.",
"equal_opportunity": "The Office of Congressman Steven Horsford is an Equal Opportunity Employer."
}
- Place PDF-extracted text files in the
output
directory - Run either parser:
python parser.py # or python parser2.py
- Find parsed JSON files in the
json_gemini_flash
directory
- Python 3.6+
- Gemini API access
- Subprocess module
- JSON module
- Regular expressions library
If you have House job announcement PDFs or emails that aren't in this collection, please send them to [email protected].
MIT License
Copyright (c) 2025 Derek Willis
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.