Congressional Districts API
Look up Congressional districts and legislator contact information via API. No pre-geocoding necessary.
Quick Summary
Geocodio can match any U.S. address to its Congressional district, state legislative districts, and current legislator contact information. Upload a spreadsheet or use the API. Results include district boundaries from the most recent redistricting cycle.
Need to add Congressional districts or Senator and Representative contact information to addresses or latitude/longitude coordinates in bulk? You're in the right place.
Congressional and state legislative district data from Geocodio
Geocodio is designed for the batch processing of addresses and enriching them with additional data, like Congressional and state legislative districts. When you request those data appends, here’s what you can expect back:
Current Congressional district (e.g., CA-52)
State legislative districts (upper and lower chambers)
Legislator names and contact information for each matched district
District boundaries from the most recent redistricting maps, updated as new maps take effect
Redistricting
Geocodio independently tracks redistricting, so you can be confident that you're always getting the most up-to-date district boundaries.
Preparing your addresses
Addresses do not need to be complete for Geocodio to return Congressional or state legislative district results. Any of these combinations will work:
Street + City + State (ex, 960 Orange Avenue, Coronado, CA)
Street + ZIP (ex., 5020 E Sprague Ave 99212)
ZIP only (ex 01983)
A full address with street, city, state, and ZIP code will return the most precise match. ZIP-code-only lookups work, but keep in mind that ZIP codes can span more than one Congressional district. In those cases, Geocodio returns all possible districts via API and the most likely district when uploading spreadsheets.
Create a free API key
Next, create an API key. Creating an account and an API key is free.
You can create an API key here.
How you’ll be billed
Each address is billed as a geocode plus a Congressional district append, which counts as two lookups. For example, 100 addresses with Congressional district data would count as 200 lookups. You can calculate how much this will cost you here.
The first 2,500 lookups per day are free, so for small projects or testing, you may not need to pay anything. Any overage is billed on the first of the following month.
For high-volume usage, our Unlimited plans can offer significant savings over pay-as-you-go.
See more about our pricing here.
Choose a Client Library
Geocodio has official libraries for node.JS, Python, Ruby, and PHP (including Laravel features). There are also community-created libraries for R, Clojure, Perl, Go, and C#.
Look up Congressional Districts via API
Congressional district lookups work with both forward geocoding (address to coordinates) and reverse geocoding (coordinates to address). Add fields=cd to your request, and Geocodio returns the matching Congressional district along with your geocoded result.
curl "https://api.geocod.io/v1.12/geocode?q=1109+N+Highland+St%2C+Arlington+VA&fields=cd,stateleg&api_key=YOUR_API_KEY"
curl "https://api.geocod.io/v1.12/reverse?q=38.886672,-77.094735&fields=cd,stateleg&api_key=YOUR_API_KEY"
See the full API documentation here.
Not a Developer? Add Congressional and State Legislative Districts to a Spreadsheet
Geocodio can add Congressional districts to a spreadsheet of addresses, no code required. Upload a CSV or Excel file, select "Congressional district" as a data append, and download the results. Upload your file here.
Senator and Representative Contact Information
Geocodio provides senator and representative contact and biographical details for both US Congress and state legislatures. (Not all information is available for all representatives.)
In elections, we can’t have even a 5% tolerance for error. Geocodio gives us the accuracy we need to give people the correct information about the election and remind them to vote.
Related Resources
ZIP Codes to Congressional Districts
If you only have ZIP codes, we can return all of the possible Congressional districts ranked by likelihood in our API. (Most likely result is returned for spreadsheets.)
Historical Congressional Districts
Use our API to get Congressional districts back to the 113th Congress.
Find Senator and Representative Phone Numbers in Bulk
Need to help people contact Congress? Geocodio can help.
Add State Legislative Districts
If you also need state-level districts, you can add them at the same time as Congressional districts.
Pricing
Congressional districts count as an additional lookup. Use our pricing calculator to see how much it might cost you.
Canadian Ridings
Working with data in Canada? Geocodio can also help you add federal and provincial/territorial ridings (Canadian electoral districts).
While you were reading this page, Geocodio processed 5.3 million requests.
Ready to add yours?