API Reference
Complete reference for the Legisletter API. Look up legislators by address, get contact info, and build civic engagement tools.
The Legisletter API provides programmatic access to legislator data. Look up federal representatives by address and get comprehensive contact information, social media handles, and more.
Base URL
https://api.legisletter.org/v1Authentication
All API requests require authentication via API key. Include your key in the Authorization header:
Authorization: Bearer ll-sk-your-api-key-hereGet your free API key at api.legisletter.org.
Rate Limits
| Plan | Lookups/Month | Price | Coverage |
|---|---|---|---|
| Free | 100 | $0 | Federal |
| Pro | 2,000 | $20/mo | Federal + State |
| National | 25,000 | $200/mo | Federal + State + Local |
Rate limit headers are included in every response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1703980800Endpoints
District Lookup
Look up legislators by address. Returns senators and house representative for the given location.
GET /api/v1/lookup
POST /api/v1/lookupParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
address | string | Yes | Full US address (street, city, state, zip) |
Example Request
curl "https://api.legisletter.org/v1/lookup?address=350+5th+Ave,+New+York,+NY+10118" \
-H "Authorization: Bearer ll-sk-your-api-key"Example Response
{
"success": true,
"address": {
"input": "350 5th Ave, New York, NY 10118",
"normalized": "350 5th Ave, New York, NY 10118"
},
"coordinates": {
"lat": 40.7484,
"lng": -73.9857
},
"district": {
"state": "NY",
"congressionalDistrict": "12",
"districtCode": "NY12"
},
"representatives": {
"senators": [
{
"name": "Chuck Schumer",
"firstName": "Chuck",
"lastName": "Schumer",
"chamber": "senate",
"party": "Democrat",
"state": "NY",
"district": null,
"phone": "(202) 224-6542",
"website": "https://www.schumer.senate.gov",
"contactForm": "https://www.schumer.senate.gov/contact/email-chuck",
"avatar": "https://bioguide.congress.gov/...",
"twitter": "SenSchumer",
"facebook": "saborchuck",
"bioguideId": "S000148"
},
{
"name": "Kirsten Gillibrand",
"firstName": "Kirsten",
"lastName": "Gillibrand",
"chamber": "senate",
"party": "Democrat",
"state": "NY",
"district": null,
"phone": "(202) 224-4451",
"website": "https://www.gillibrand.senate.gov",
"contactForm": "https://www.gillibrand.senate.gov/contact/email-me",
"avatar": "https://bioguide.congress.gov/...",
"twitter": "SenGillibrand",
"facebook": "KirstenGillibrand",
"bioguideId": "G000555"
}
],
"representative": {
"name": "Jerry Nadler",
"firstName": "Jerry",
"lastName": "Nadler",
"chamber": "house",
"party": "Democrat",
"state": "NY",
"district": "12",
"phone": "(202) 225-5635",
"website": "https://nadler.house.gov",
"contactForm": "https://nadler.house.gov/contact",
"avatar": "https://bioguide.congress.gov/...",
"twitter": "RepJerryNadler",
"facebook": "CongressmanNadler",
"bioguideId": "N000002"
}
},
"authenticated": true,
"tier": "FREE"
}Response Fields
Representative Object
| Field | Type | Description |
|---|---|---|
name | string | Full name |
firstName | string | First name |
lastName | string | Last name |
chamber | string | "senate" or "house" |
party | string | Party affiliation |
state | string | Two-letter state code |
district | string | District number (House only) |
phone | string | DC office phone |
website | string | Official website URL |
contactForm | string | Contact form URL |
avatar | string | Photo URL |
twitter | string | Twitter/X handle |
facebook | string | Facebook page |
bioguideId | string | Bioguide ID |
Error Responses
400 Bad Request
{
"success": false,
"error": "Missing required parameters",
"message": "Provide either \"address\" or both \"lat\" and \"lng\" parameters"
}401 Unauthorized
{
"error": "Invalid API key",
"message": "The provided API key is invalid, inactive, or expired."
}429 Rate Limited
{
"error": "Rate limit exceeded",
"message": "Rate limit exceeded. Resets at 2024-01-01T00:00:00.000Z",
"limit": 100,
"reset": 1704067200000
}