Attention, codefags and datafags
I found a (new to me, anyway) website with an API that can be harnessed. That website (pic related) is called Follow the Money, it's a government financial database.
Houses contributions data for candidates running for state office in all 50 states since 2000 (though data for some goes back to 1989). Ballot measure contributions data in 2004, and independent spending data for some state elections in 2006, recently added contributions data for candidates running for federal office, and some local offices beginning in 2011-2012.
After registering for a free account, you can create some pretty complex queries using their databases.
https://www.followthemoney.org/