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/v1

Authentication

All API requests require authentication via API key. Include your key in the Authorization header:

Authorization: Bearer ll-sk-your-api-key-here

Get your free API key at api.legisletter.org.

Rate Limits

PlanLookups/MonthPriceCoverage
Free100$0Federal
Pro2,000$20/moFederal + State
National25,000$200/moFederal + State + Local

Rate limit headers are included in every response:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1703980800

Endpoints

District Lookup

Look up legislators by address. Returns senators and house representative for the given location.

GET /api/v1/lookup
POST /api/v1/lookup

Parameters

ParameterTypeRequiredDescription
addressstringYesFull 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

FieldTypeDescription
namestringFull name
firstNamestringFirst name
lastNamestringLast name
chamberstring"senate" or "house"
partystringParty affiliation
statestringTwo-letter state code
districtstringDistrict number (House only)
phonestringDC office phone
websitestringOfficial website URL
contactFormstringContact form URL
avatarstringPhoto URL
twitterstringTwitter/X handle
facebookstringFacebook page
bioguideIdstringBioguide 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
}

Ready to get started?

Create your free API key and start making requests in minutes.

Get Your API Key