A CLI tool to download campaign contribution data from PowerSearch, a tool published by the California Secretary of State.
Note: This tool is currently a prototype and may not be further developed.
Please note that any text fields such as canidate names, committee names, offices, or ballot measure titles come from PowerSearch. Additionally, there are subtle differences between PowerSearch's interface for contributions and for independent expenditures so take care to match the correct one.
Usage: powersearch-download [OPTIONS]
Download campaign contribution or independent expenditure data from
California secretary of state's tool called PowerSearch
Options:
-t, --data-type TEXT Can be "contributions" or "ie" Default:
contributions
--candidate TEXT Candidate name
--committee TEXT Limit data to one specific committee
-e, --election-cycle TEXT Election cycles in YYYY-YYYY format
-m, --measures TEXT Limit data to specific ballot measures
--office TEXT Office such as 'Governor', 'Secretary of State',
or 'State Assembly'
--output TEXT Output file path
--position TEXT Limit independent expenditure data to one
particular position (S or O; support or oppose)
-s, --silent Do not error regardless of query
--user-agent TEXT User-Agent HTTP header for request to
PowerSearch Default: Mozilla/5.0 (Macintosh;
Intel Mac OS X 10_15_7) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/146.0.0.0
Safari/537.36
-v, --verbose Show extra information
--help Show this message and exit.Download all contributions to Xavier Becerra in his gubernatorial campaign
powersearch-download -t contributions --candidate "Becerra, Xavier" --office Governor
Download all contributions to State Assembly candidates in the 2025-2026 cycle
powersearch-download -t contributions --office "State Assembly" --election-cycle 2025-2026
Download all independent expenditures spent against Tom Steyer in 2025-2026
powersearch-download -t ie --candidate "Steyer, Tom" --position O --election-cycle 2025-2026
Download all independent expenditures in the last three cycles
powersearch-download -t ie --election-cycle 2025-2026 --election-cycle 2023-2024 --election-cycle 2021-2022
You can install the CLI tool from this Github repository using pip or uv:
pip install git+https://github.com/CalMatters/powersearch-download.gituv pip install "git+https://github.com/CalMatters/powersearch-download.git"The output data of this tool is downloaded, unmodified data from California's Powersearch tool.
| Field | Description |
|---|---|
| Recipient Name | Name of the candidate associated with the committee (applies only to candidate committees) |
| Recipient Committee | Name of the committee receiving the contribution |
| Recipient Committee ID | The committee ID# of the recipient committee |
| Office Sought | The office sought by a particular candidate (applies only to candidate committees). Note that this field may contain the office held by a particular candidate if he/she filled out the form as such |
| Ballot Measure(s) | Name(s) of the ballot measure(s) and the position taken on them (supported or opposed) by a particular recipient committee. Note that one contribution to a multi-measure committee will show each measure supported or opposed by that committee |
| Contributor Name | The name of the contributor as provided by the recipient committee in their filings |
| Contributor ID | The official committee ID# of the contributor (if it exists and is reported), as provided by the recipient committee |
| Amount | The amount of the contribution |
| Date | The date on which the contribution was received |
| Contributor Employer | the employer of the contributor usually applies only to individuals/employees |
| Contributor Occupation | The occupation of the contributor, usually applies only to individuals/employees |
| Contributor State | The state in which the contributor is situated |
| District | The district in which a candidate is running (applies only to candidates for State Senate and Assembly) |
| Contributor Zip Code | The zip code in which the contributor is situated |
| Contributor City | The city in which the contributor is situated |
| Transaction Type | The type of contribution; can be a monetary contribution, non-monetary contribution, or a loan |
| Election | The specific election date for which the candidate or measure will be on the ballot |
| Cycle | The First Year (odd) of the two-year period in which the contribution is made . For example, the 2013 cycle is 2013-2014 period |
We made this tool because we needed it to regularly download contribution data from PowerSearch in our workflows and this tool does two main things:
- Makes it easier to construct queries
- Errors out if there is a problem with the downloaded data
We use this tool to build our 2026 California voter guide and we're sharing it publicly in case other folks need it or have ideas for improvement.
While the contents of this repo are shared under an Apache 2.0 license, CalMatters/The Markup would appreciate any credit or attribution you're willing to give. We're also interested to learn how you used it, so feel free to send us a message or open an issue if you do. If you have any questions, feel free to contact us as well.
CalMatters is a nonpartisan, nonprofit journalism venture committed to explaining how California’s state Capitol works and why it matters.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. There is a full copy of the License in this repository.