< back to index

HTTP request

GET https://api.wevoteusa.org/apis/v1/representativesQuery (Jump to "Try It Now")

Required Parameters

Parameter name Value Description
year string Year in this format: YYYY

Optional Parameters

Parameter name Value Description
race_office_level list of strings Limit the representatives returned to: Federal, State, Local
search_text string The word or words we want to search for in all representatives.
state string Limit the representatives returned to this state.


  "status": string,
  "success": boolean,
  "index_start": integer,
  "returned_count": integer,
  "total_count": integer,
  "kind": string,
  "state": string,
  "office_held_list": {
     "id": integer,
     "name": string,
     "we_vote_id": string,
  "representatives": list
     "id": integer,
     "status": string,
     "success": boolean,
     "ballot_item_display_name": string,
     "kind_of_ballot_item": string,
     "last_updated": string (time in this format %Y-%m-%d %H:%M:%S),
     "office_held_we_vote_id": string,
     "party": string,
     "politician_we_vote_id": string,
     "representative_photo_url_large": string,
     "representative_photo_url_medium": string,
     "representative_photo_url_tiny": string,
     "we_vote_id": string,

Response Status Codes

Code Description
CANDIDATES_RETRIEVED Candidates were returned.
NO_CANDIDATES_RETRIEVED There are no representatives stored for this Office.

Try It Now: API Variables

Retrieve all the representatives in a particular election or state.

Parameter name Value  

(opens in new window)