Sunlight Labs has an API that'll do it by zip code:
http://services.sunlightlabs.com/docs/Sunlight_Congress_API/
They've got libraries for Ruby, Python, and even PHP, and the interface is drop-dead simple. Definitely worth a look - I'm baking them into one of my projects right now.