The data you are looking for is available at openstates.org. This is a project of the Sunlight Foundation. They have an API and a bulk download page (JSON and CSV) at : http://openstates.org/downloads/
The about page on their website:
Open States is a collection of tools that make it possible for citizens to track what is happening in their state's capitol by aggregating information from all 50 states, Washington, D.C., and Puerto Rico.
Using the site is simple: enter a U.S. address or select a state to start to research bills, review voting records, contact elected officials and more. Check out this Sunlight Academy tutorial to see how Open States can help citizens, journalists and activists learn more about their state government.
Open States is a project of the Sunlight Foundation. Thank you to the Rita Allen Foundation, Minnesota Historical Society and Open Society Foundations for their generous support.