U.S. Senate States Access Skill
This skill fetches information about U.S. Senators from the official senate.gov website, specifically from the state profile pages at https://www.senate.gov/states/{STATE}/intro.htm.
Features
Get Senators by State
Retrieve detailed information about current U.S. Senators for any state, including:
- Senator name and party affiliation
- Official website URL
- Photo URL
- Hometown
- Contact page URL
- Senate office building address
- Washington, DC mailing address
- Phone number
- Committee assignments link
- Biographical Directory link and ID
List All States
Get a complete list of all U.S. states and territories with their two-letter codes and profile URLs.
Get State History
Retrieve historical information about a state's Senate representation, including:
- When the state joined the Union
- First senators
- Longest-serving senators
- Notable leadership positions
Usage Examples
Get Senators for Oklahoma
{
"function": "get_senators_by_state",
"state_code": "OK"
}
Get Senators for Ohio
{
"function": "get_senators_by_state",
"state_code": "OH"
}
List All Available States
{
"function": "list_all_states"
}
Get State History
{
"function": "get_state_history",
"state_code": "WV"
}
Response Format
Senators Response
{
"success": true,
"state_code": "OK",
"state_name": "Oklahoma",
"senators": [
{
"state_code": "OK",
"name": "James Lankford",
"party": "R",
"website": "https://www.lankford.senate.gov",
"photo_url": "https://bioguide.congress.gov/bioguide/photo/L/L000575.jpg",
"hometown": "Oklahoma City",
"contact_url": "https://www.lankford.senate.gov/contact/email",
"committee_assignments_url": "https://www.senate.gov/general/committee_assignments/assignments.htm#LankfordOK",
"bioguide_url": "https://bioguide.congress.gov/search/bio/L000575",
"bioguide_id": "L000575",
"office_address": "731 Hart Senate Office Building",
"mailing_address": "731 Hart Senate Office Building\nWashington DC 20510",
"phone": "(202) 224-5754"
}
],
"senator_count": 2,
"state_history": "Oklahoma became the 46th state in the Union on November 16, 1907..."
}
States List Response
{
"success": true,
"states": [
{"code": "AL", "name": "Alabama", "profile_url": "https://www.senate.gov/states/AL/intro.htm"},
{"code": "AK", "name": "Alaska", "profile_url": "https://www.senate.gov/states/AK/intro.htm"},
...
],
"total_count": 50
}
State Codes
All 50 U.S. states plus territories are supported:
- 50 states: AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY
Data Sources
Notes
- This skill uses direct HTTP requests with HTML parsing (BeautifulSoup) for efficient data extraction
- No browser automation is required
- All senator information is sourced from official U.S. Senate websites
- The Bioguide ID can be used to query the Congress.gov API for additional legislative data
- Photo URLs may be either from bioguide.congress.gov or senate.gov local storage
Error Handling
The skill returns structured error responses:
invalid_state_code: The provided state code is not valid
missing_state_code: Required state_code parameter was not provided
not_found: The state page was not found (404 error)
http_error: HTTP error occurred during request
no_senators_found: Page loaded but no senator data was found
1---2name: www-senate-gov3description: U.S. Senate States Access Skill4---5# U.S. Senate States Access Skill67This skill fetches information about U.S. Senators from the official senate.gov website, specifically from the state profile pages at `https://www.senate.gov/states/{STATE}/intro.htm`.89## Features1011### Get Senators by State12Retrieve detailed information about current U.S. Senators for any state, including:13- Senator name and party affiliation14- Official website URL15- Photo URL16- Hometown17- Contact page URL18- Senate office building address19- Washington, DC mailing address20- Phone number21- Committee assignments link22- Biographical Directory link and ID2324### List All States25Get a complete list of all U.S. states and territories with their two-letter codes and profile URLs.2627### Get State History28Retrieve historical information about a state's Senate representation, including:29- When the state joined the Union30- First senators31- Longest-serving senators32- Notable leadership positions3334## Usage Examples3536### Get Senators for Oklahoma37```json38{39 "function": "get_senators_by_state",40 "state_code": "OK"41}42```4344### Get Senators for Ohio45```json46{47 "function": "get_senators_by_state",48 "state_code": "OH"49}50```5152### List All Available States53```json54{55 "function": "list_all_states"56}57```5859### Get State History60```json61{62 "function": "get_state_history",63 "state_code": "WV"64}65```6667## Response Format6869### Senators Response70```json71{72 "success": true,73 "state_code": "OK",74 "state_name": "Oklahoma",75 "senators": [76 {77 "state_code": "OK",78 "name": "James Lankford",79 "party": "R",80 "website": "https://www.lankford.senate.gov",81 "photo_url": "https://bioguide.congress.gov/bioguide/photo/L/L000575.jpg",82 "hometown": "Oklahoma City",83 "contact_url": "https://www.lankford.senate.gov/contact/email",84 "committee_assignments_url": "https://www.senate.gov/general/committee_assignments/assignments.htm#LankfordOK",85 "bioguide_url": "https://bioguide.congress.gov/search/bio/L000575",86 "bioguide_id": "L000575",87 "office_address": "731 Hart Senate Office Building",88 "mailing_address": "731 Hart Senate Office Building\nWashington DC 20510",89 "phone": "(202) 224-5754"90 }91 ],92 "senator_count": 2,93 "state_history": "Oklahoma became the 46th state in the Union on November 16, 1907..."94}95```9697### States List Response98```json99{100 "success": true,101 "states": [102 {"code": "AL", "name": "Alabama", "profile_url": "https://www.senate.gov/states/AL/intro.htm"},103 {"code": "AK", "name": "Alaska", "profile_url": "https://www.senate.gov/states/AK/intro.htm"},104 ...105 ],106 "total_count": 50107}108```109110## State Codes111112All 50 U.S. states plus territories are supported:113- 50 states: AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY114115## Data Sources116117- **Website**: https://www.senate.gov118- **State Profiles**: https://www.senate.gov/states/{STATE}/intro.htm119- **Biographical Directory**: https://bioguide.congress.gov120121## Notes122123- This skill uses direct HTTP requests with HTML parsing (BeautifulSoup) for efficient data extraction124- No browser automation is required125- All senator information is sourced from official U.S. Senate websites126- The Bioguide ID can be used to query the Congress.gov API for additional legislative data127- Photo URLs may be either from bioguide.congress.gov or senate.gov local storage128129## Error Handling130131The skill returns structured error responses:132- `invalid_state_code`: The provided state code is not valid133- `missing_state_code`: Required state_code parameter was not provided134- `not_found`: The state page was not found (404 error)135- `http_error`: HTTP error occurred during request136- `no_senators_found`: Page loaded but no senator data was found