Sunlight congress used to provide a pretty solid API for retrieving congressional districts based on location. However, it seems their primary hosting services have gone down, as you can no longer get API keys and the server hosts return 500. It appears that Open Congress Foundation has taken some of their functionality but not this particular functionality, and launching their code as a server was pretty heavy duty, requiring some setup and a MongoDB.
CDF-Heroku (Congress District Finder for Heroku) is a simple node server that can be easily deployed to Heroku so that you can have your own restful endpoint. It's based on Congress District Finder NPM
Right now I've only implemented district from Lat / Lng. Let me know if you'd like to see some of the other methods implemented.
Unless it gets bombarded, I'm running an instance for you at http://congress.logichigh.com, so you can make the API calls straight!
Documentation is generated from the swagger.yml file automatically and placed in the docs directory
Clone repository then:
npm install
npm build
npm start