indiavotes.com APIindiavotes.com ↗
Access Indian Lok Sabha and Vidhan Sabha election results, constituency details, candidate search, and party performance data via the IndiaVotes API.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/cb783535-dd58-4206-8ecf-4783e2766dce/get_pc_elections' \ -H 'X-API-Key: $PARSE_API_KEY'
Get available Lok Sabha (Parliamentary) election years and their IDs. Returns all elections from 1952 to present.
No input parameters required.
{
"type": "object",
"fields": {
"data": "array of election objects with id and year",
"status": "string indicating success"
},
"sample": {
"data": [
{
"id": "18",
"year": "2024"
},
{
"id": "17",
"year": "2019"
},
{
"id": "16",
"year": "2014"
}
],
"status": "success"
}
}About the indiavotes.com API
The IndiaVotes API covers 7 endpoints exposing Indian parliamentary and assembly election data from 1952 to the present. Use get_lok_sabha_results to retrieve party summaries and constituency-level outcomes for any Lok Sabha year, or search_candidates to look up a candidate's full electoral history across name, party, constituency, and vote share.
Election Index and State Coverage
get_pc_elections returns the full list of Lok Sabha election objects, each with an id and year, spanning every general election from 1952 onward. Once you have an election_id, get_pc_states maps it to the states that participated, returning id and value (state name) for each. For assembly elections, get_ac_elections accepts a state_id and returns the Vidhan Sabha election history for that state. These three endpoints form the lookup layer that drives all downstream queries.
Results and Constituency Detail
get_lok_sabha_results accepts a year and an optional state_id (pass '0' for all states) and returns two blocks: summary — an array of party-level aggregates — and constituencies — an array of seat-level outcomes including winner, margin, and URL slugs needed for drilling down. get_constituency_details accepts year, category ('pc' or 'ac'), state_id, detail_id, const_slug, state_slug, and election_id, and returns a metadata object with constituency metadata plus a candidates array covering every candidate's votes, percentage, rank, and party.
Candidate Search and Party Aggregates
search_candidates takes a free-text name and a category, with an optional state_id for assembly searches. The response array includes Candidate Name, Year, PC Name, State, Votes, %Votes, Rank, and Party across all matching elections — useful for tracking a politician's results across multiple cycles. get_all_party_results shifts focus to the party level: for Lok Sabha queries it returns contestants, wins, second-place finishes, thirds, and vote percentages; for Vidhan Sabha it returns seats won and vote percentage per party.
- Build a dashboard tracking a politician's vote share and rank across every election cycle using
search_candidates. - Compare party seat tallies and contestant counts between two Lok Sabha elections with
get_all_party_results. - Generate state-level election result summaries filtered by
state_idviaget_lok_sabha_results. - Show margin-of-victory and candidate breakdowns for a specific constituency using
get_constituency_details. - List all Vidhan Sabha elections held in a given state and their IDs via
get_ac_electionsfor historical analysis. - Map party performance across constituencies in a single state for a given election year.
- Power an election-results API for a news portal covering both parliamentary and assembly elections.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does IndiaVotes have an official developer API?+
What does `get_constituency_details` return, and which parameters are required?+
get_constituency_details requires year, category, state_id, detail_id, const_slug, state_slug, and election_id. It returns a metadata object with constituency-level context and a candidates array where each entry includes the candidate's name, party, total votes, vote percentage, and finishing rank. The detail_id and slug values are obtained from the constituencies array in a prior get_lok_sabha_results call.Does `search_candidates` work for both Lok Sabha and Vidhan Sabha elections?+
category as 'pc' for Lok Sabha or 'ac' for Vidhan Sabha. For assembly searches, state_id is required. Results include Year, PC Name, State, Votes, %Votes, Rank, and Party for each matching record.Are voter demographics, turnout breakdowns, or EVM data included?+
How far back does historical election data go, and are by-election results included?+
get_pc_elections returns Lok Sabha elections from 1952 to the present. By-election (mid-term) results are not currently returned as a distinct category. You can fork this API on Parse and revise it to add a dedicated by-election endpoint if that coverage is needed.