Pollster API
The Pollster API provides programmatic access to the results of tens of thousands of opinion polls we've collected since 2004 as well as our estimates of the current opinion on various candidates and topics.
This API is for developers who want to incorporate our data into their own applications. To embed a chart on your site or download poll results as a spreadsheet, follow the links below each chart.
API Summary
| Base URI | http://elections.huffingtonpost.com/pollster/api |
|---|---|
| HTTP method | GET |
| Response formats | JSON (.json), XML (.xml), JSONP (.json?callback=pollsterCallback)
|
Methods
- Charts - returns a list of the charts available through the Pollster API
- Chart - returns information about a particular chart, including historical estimates
- Polls - returns a list of all polls, filtered by geography, chart or topic
Charts
Get a list of the charts available through the Pollster API.
URL
http://elections.huffingtonpost.com/pollster/api/charts
Parameters
| Parameter | Sample values | |
|---|---|---|
state |
Only include charts from a single state ('US' will return all national charts) | MA, NY, CA, US |
topic |
Only include charts related to a specific topic | obama-job-approval, favorable-ratings, 2016-senate-dem-primary, 2016-senate, 2016-president-gop-primary, 2016-president-dem-primary, 2016-president, 2016-governor, 2014-senate-primary, 2014-senate-gop-primary, 2014-senate-dem-primary, 2014-senate, 2014-house, 2014-governor-gop-primary, 2014-governor-dem-primary, 2014-governor, 2013-senate-gop-primary, 2013-senate-dem-primary, 2013-senate, 2013-house, 2013-governor, 2012-senate-gop-primary, 2012-senate-dem-primary, 2012-senate, 2012-president-gop-primary, 2012-president, 2012-house, 2012-governor-gop-primary, 2012-governor-dem-primary, 2012-governor |
showall |
Include charts for races that were once possible but didn't happen (e.g. Gingrich vs. Obama 2012) | true |
Sample Request and Response
http://elections.huffingtonpost.com/pollster/api/charts
[
{
"title":"2012 Iowa GOP Primary",
"slug":"2012-iowa-gop-primary",
"topic":"2012-gop-primary",
"state":"IA",
"poll_count":65,
"last_updated":"2012-01-02T17:08:44Z",
"url":"http://elections.huffingtonpost.com/pollster/2012-iowa-gop-primary",
"estimates":[
{
"choice":"Paul",
"value":21.3
},
{
"choice":"Other",
"value":0.9
},
{
"choice":"Romney",
"value":22.5
},
{
"choice":"Perry",
"value":11.1
},
{
"choice":"Undecided",
"value":5.9
},
{
"choice":"Bachmann",
"value":8.3
},
{
"choice":"Santorum",
"value":15.9
},
{
"choice":"Gingrich",
"value":12.6
},
{
"choice":"Huntsman",
"value":3.7
}
]
},
{
"title":"2012 New Hampshire GOP Primary",
"slug":"2012-new-hampshire-gop-primary",
"topic":"2012-gop-primary",
"state":"NH",
"poll_count":55,
"last_updated":"2012-01-10T13:49:33Z",
"url":"http://elections.huffingtonpost.com/pollster/2012-new-hampshire-gop-primary",
"estimates":[
{
"choice":"Perry",
"value":1.0
},
{
"choice":"Paul",
"value":18.8
},
{
"choice":"Romney",
"value":39.6
},
{
"choice":"Santorum",
"value":11.0
},
{
"choice":"Huntsman",
"value":11.9
},
{
"choice":"Gingrich",
"value":9.2
},
{
"choice":"Undecided",
"value":6.9
},
{
"choice":"Other",
"value":1.6
}
]
}
]
Chart
Returns a single chart, specified by a chart slug. The response includes both current and past estimates for each choice in the chart.
URL
http://elections.huffingtonpost.com/pollster/api/charts/SLUG
Sample Request and Response
http://elections.huffingtonpost.com/pollster/api/charts/2012-general-election-romney-vs-obama.json
{
"title":"2012 General Election: Romney vs. Obama",
"slug":"2012-general-election-romney-vs-obama",
"topic":"2012-president",
"state":"US",
"poll_count":341,
"last_updated":"2012-06-29T17:31:14Z",
"url":"http://elections.huffingtonpost.com/pollster/2012-general-election-romney-vs-obama",
"estimates":[
{
"choice":"Romney",
"value":44.5
},
{
"choice":"Obama",
"value":46.6
},
{
"choice":"Other",
"value":4.0
},
{
"choice":"Undecided",
"value":6.1
}
],
"estimates_by_date":[
{
"date":"2012-06-28",
"estimates":[
{
"choice":"Romney",
"value":44.5
},
{
"choice":"Obama",
"value":46.6
}
]
},
{
"date":"2012-06-27",
"estimates":[
{
"choice":"Romney",
"value":44.5
},
{
"choice":"Obama",
"value":46.5
},
{
"choice":"Other",
"value":4.0
},
{
"choice":"Undecided",
"value":6.1
}
]
},
{
"date":"2012-05-29",
"estimates":[
{
"choice":"Romney",
"value":44.3
},
{
"choice":"Obama",
"value":46.6
}
]
}
]
}
Polls
Get a list of polls available through the Pollster API. The list can be filtered to show only polls related to a specific chart, state or topic.
URL
http://elections.huffingtonpost.com/pollster/api/polls
Parameters
| Parameter | Sample values | |
|---|---|---|
page |
Polls are listed in pages of 10 | 2,3,4 |
chart |
Only list polls related to a specific chart (The name of the chart is the slug attribute found in the response to the Charts method) |
obama-job-approval, 2012-general-election-romney-vs-obama |
state |
Only list polls from a specific state ('US' will return all national polls) | MA, NY, CA, US |
topic |
Only list polls related to the specified topic | obama-job-approval, favorable-ratings, 2016-senate-dem-primary, 2016-senate, 2016-president-gop-primary, 2016-president-dem-primary, 2016-president, 2016-governor, 2014-senate-primary, 2014-senate-gop-primary, 2014-senate-dem-primary, 2014-senate, 2014-house, 2014-governor-gop-primary, 2014-governor-dem-primary, 2014-governor, 2013-senate-gop-primary, 2013-senate-dem-primary, 2013-senate, 2013-house, 2013-governor, 2012-senate-gop-primary, 2012-senate-dem-primary, 2012-senate, 2012-president-gop-primary, 2012-president, 2012-house, 2012-governor-gop-primary, 2012-governor-dem-primary, 2012-governor |
before |
Only list polls that ended on or before the specified date | 2012-07-01, 2010-01-01 |
after |
Only list polls that ended on or after the specified date | 2012-04-21, 2010-12-31 |
sort |
Sort polls by last updated time (Useful for seeing what has changed since the last time you looked) | updated |
showall |
Include polls for races that were once possible but didn't happen (e.g. Gingrich vs. Obama 2012) | true |
Sample Request and Response
http://elections.huffingtonpost.com/pollster/api/polls.json?page=2
[
{
"id": 19931,
"pollster": "Rasmussen",
"start_date": "2014-07-24",
"end_date": "2014-07-26",
"method": "Automated Phone",
"source": "http://www.rasmussenreports.com/public_content/politics/obama_administration/obama_approval_index_history",
"last_updated": "2014-07-28T14:31:38Z",
"partisan": "Nonpartisan",
"affiliation": "None",
"survey_houses": [
{
"name": "Rasmussen Reports",
"party": "N/A"
}
],
"sponsors": [],
"questions": [
{
"name": "Obama Job Approval",
"chart": "obama-job-approval",
"topic": "obama-job-approval",
"state": "US",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 500,
"margin_of_error": 3,
"responses": [
{
"choice": "Approve",
"value": 46,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Disapprove",
"value": 52,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
},
{
"id": 19929,
"pollster": "Landmark (R)",
"start_date": "2014-07-25",
"end_date": "2014-07-25",
"method": "Automated Phone",
"source": "http://www.wsbtv.com/news/news/republicans-trail-democrats-latest-georgia-polls/ngncr/",
"last_updated": "2014-07-28T14:25:36Z",
"partisan": "Pollster",
"affiliation": "Rep",
"survey_houses": [
{
"name": "Landmark Communications",
"party": "Rep"
}
],
"sponsors": [
{
"name": "WSB-TV",
"party": "N/A"
}
],
"questions": [
{
"name": "2014 Georgia Governor: Deal vs. Carter",
"chart": "2014-georgia-governor-deal-vs-carter",
"topic": "2014-governor",
"state": "GA",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 750,
"margin_of_error": 3.8,
"responses": [
{
"choice": "Carter",
"value": 47,
"first_name": "Jason",
"last_name": "Carter",
"party": "Dem",
"incumbent": false
},
{
"choice": "Deal",
"value": 40,
"first_name": "Nathan",
"last_name": "Deal",
"party": "Rep",
"incumbent": true
},
{
"choice": "Hunt",
"value": 5,
"first_name": "Andrew",
"last_name": "Hunt",
"party": "Lib",
"incumbent": false
},
{
"choice": "Undecided",
"value": 9,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
},
{
"name": "2014 Georgia Senate: Perdue vs. Nunn",
"chart": "2014-georgia-senate-perdue-vs-nunn",
"topic": "2014-senate",
"state": "GA",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 750,
"margin_of_error": 3.8,
"responses": [
{
"choice": "Nunn",
"value": 47,
"first_name": "Michelle",
"last_name": "Nunn",
"party": "Dem",
"incumbent": false
},
{
"choice": "Perdue",
"value": 43,
"first_name": "David",
"last_name": "Perdue",
"party": "Rep",
"incumbent": false
},
{
"choice": "Swafford",
"value": 4,
"first_name": "Amanda",
"last_name": "Swafford",
"party": "Lib",
"incumbent": false
},
{
"choice": "Undecided",
"value": 7,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
},
{
"id": 19933,
"pollster": "Gallup",
"start_date": "2014-07-23",
"end_date": "2014-07-25",
"method": "Phone",
"source": "http://www.gallup.com/poll/113980/Gallup-Daily-Obama-Job-Approval.aspx",
"last_updated": "2014-07-28T14:34:41Z",
"partisan": "Nonpartisan",
"affiliation": "None",
"survey_houses": [
{
"name": "Gallup Poll",
"party": "N/A"
}
],
"sponsors": [],
"questions": [
{
"name": "Obama Job Approval",
"chart": "obama-job-approval",
"topic": "obama-job-approval",
"state": "US",
"subpopulations": [
{
"name": "Adults",
"observations": 1500,
"margin_of_error": 3,
"responses": [
{
"choice": "Approve",
"value": 40,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Disapprove",
"value": 53,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
},
{
"id": 19930,
"pollster": "Rasmussen",
"start_date": "2014-07-23",
"end_date": "2014-07-25",
"method": "Automated Phone",
"source": "http://www.rasmussenreports.com/public_content/politics/obama_administration/obama_approval_index_history",
"last_updated": "2014-07-28T14:26:41Z",
"partisan": "Nonpartisan",
"affiliation": "None",
"survey_houses": [
{
"name": "Rasmussen Reports",
"party": "N/A"
}
],
"sponsors": [],
"questions": [
{
"name": "Obama Job Approval",
"chart": "obama-job-approval",
"topic": "obama-job-approval",
"state": "US",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 500,
"margin_of_error": 3,
"responses": [
{
"choice": "Approve",
"value": 44,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Disapprove",
"value": 54,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
},
{
"id": 20002,
"pollster": "Hendrix College/Talk Business ",
"start_date": "2014-07-22",
"end_date": "2014-07-25",
"method": "Mixed",
"source": "http://talkbusiness.net/2014/07/u-s-senate-poll-tom-cotton-44-mark-pryor-42/",
"last_updated": "2014-07-29T22:09:51Z",
"partisan": "Nonpartisan",
"affiliation": "None",
"survey_houses": [
{
"name": "Hendrix College",
"party": "N/A"
}
],
"sponsors": [
{
"name": "Talk Business",
"party": "N/A"
}
],
"questions": [
{
"name": "2014 Arkansas Senate: Cotton vs. Pryor",
"chart": "2014-arkansas-senate-cotton-vs-pryor",
"topic": "2014-senate",
"state": "AR",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 1780,
"margin_of_error": 2.3,
"responses": [
{
"choice": "Cotton",
"value": 44,
"first_name": "Tom",
"last_name": "Cotton",
"party": "Rep",
"incumbent": false
},
{
"choice": "LaFrance",
"value": 3,
"first_name": "Nathan",
"last_name": "LaFrance",
"party": "Lib",
"incumbent": false
},
{
"choice": "Pryor",
"value": 42,
"first_name": "Mark",
"last_name": "Pryor",
"party": "Dem",
"incumbent": true
},
{
"choice": "Swaney",
"value": 4,
"first_name": "Mark",
"last_name": "Swaney",
"party": "Gre",
"incumbent": false
},
{
"choice": "Undecided",
"value": 7,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
},
{
"id": 19976,
"pollster": "Gravis/Human Events (R)",
"start_date": "2014-07-24",
"end_date": "2014-07-24",
"method": "Mixed",
"source": "http://gravismarketing.com/polling-and-market-research/new-montana-poll/",
"last_updated": "2014-07-29T14:39:13Z",
"partisan": "Sponsor",
"affiliation": "Rep",
"survey_houses": [
{
"name": "Gravis Marketing",
"party": "N/A"
}
],
"sponsors": [
{
"name": "Human Events",
"party": "Rep"
}
],
"questions": [
{
"name": "Montana: Obama Job Approval",
"chart": "montana-obama-job-approval",
"topic": "obama-job-approval",
"state": "MT",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 781,
"margin_of_error": 3.5,
"responses": [
{
"choice": "Approve",
"value": 37,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Disapprove",
"value": 59,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Undecided",
"value": 3,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
},
{
"name": "2014 Montana Senate: Daines vs. Walsh",
"chart": "2014-montana-senate-daines-vs-walsh",
"topic": "2014-senate",
"state": "MT",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 781,
"margin_of_error": 3.5,
"responses": [
{
"choice": "Daines",
"value": 45,
"first_name": "Steve",
"last_name": "Daines",
"party": "Rep",
"incumbent": false
},
{
"choice": "Roots",
"value": 9,
"first_name": "Roger",
"last_name": "Roots",
"party": "Lib",
"incumbent": false
},
{
"choice": "Walsh",
"value": 38,
"first_name": "John",
"last_name": "Walsh",
"party": "Dem",
"incumbent": true
},
{
"choice": "Undecided",
"value": 8,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
},
{
"id": 19974,
"pollster": "Rasmussen",
"start_date": "2014-07-23",
"end_date": "2014-07-24",
"method": "Automated Phone",
"source": "http://www.rasmussenreports.com/public_content/politics/elections/election_2014/georgia/election_2014_georgia_governor",
"last_updated": "2014-07-29T14:26:00Z",
"partisan": "Nonpartisan",
"affiliation": "None",
"survey_houses": [
{
"name": "Rasmussen Reports",
"party": "N/A"
}
],
"sponsors": [],
"questions": [
{
"name": "2014 Georgia Governor: Deal vs. Carter",
"chart": "2014-georgia-governor-deal-vs-carter",
"topic": "2014-governor",
"state": "GA",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 750,
"margin_of_error": 4,
"responses": [
{
"choice": "Carter",
"value": 45,
"first_name": "Jason",
"last_name": "Carter",
"party": "Dem",
"incumbent": false
},
{
"choice": "Deal",
"value": 44,
"first_name": "Nathan",
"last_name": "Deal",
"party": "Rep",
"incumbent": true
},
{
"choice": "Other",
"value": 3,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Undecided",
"value": 8,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
},
{
"id": 19950,
"pollster": "PPP (D-League of Conservation Voters/Schatz)",
"start_date": "2014-07-23",
"end_date": "2014-07-24",
"method": "Automated Phone",
"source": "http://www.lcv.org/elections/research/hawaii-senate-primary-poll.pdf",
"last_updated": "2014-07-28T17:01:39Z",
"partisan": "Sponsor",
"affiliation": "Dem",
"survey_houses": [
{
"name": "Public Policy Polling (D)",
"party": "Dem"
}
],
"sponsors": [
{
"name": "League of Conservation Voters",
"party": "Dem"
}
],
"questions": [
{
"name": "2014 Hawaii Senate Democratic Primary",
"chart": "2014-hawaii-senate-democratic-primary",
"topic": "2014-senate-dem-primary",
"state": "HI",
"subpopulations": [
{
"name": "Likely Voters - Democrat",
"observations": 410,
"margin_of_error": 4.8,
"responses": [
{
"choice": "Hanabusa",
"value": 39,
"first_name": "Colleen",
"last_name": "Hanabusa",
"party": "Dem",
"incumbent": false
},
{
"choice": "Schatz",
"value": 49,
"first_name": "Brian",
"last_name": "Schatz",
"party": "Dem",
"incumbent": true
},
{
"choice": "Undecided",
"value": 11,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
},
{
"name": "2014 Hawaii Gubernatorial Democratic Primary",
"chart": null,
"topic": null,
"state": null,
"subpopulations": [
{
"name": "Likely Voters - Democrat",
"observations": 410,
"margin_of_error": 4.8,
"responses": [
{
"choice": "Abercrombie",
"value": 39,
"first_name": "Neil",
"last_name": "Abercrombie",
"party": "Dem",
"incumbent": true
},
{
"choice": "Ige",
"value": 49,
"first_name": "David",
"last_name": "Ige",
"party": "Dem",
"incumbent": false
},
{
"choice": "Undecided",
"value": 12,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
},
{
"id": 19928,
"pollster": "Rasmussen",
"start_date": "2014-07-23",
"end_date": "2014-07-24",
"method": "Automated Phone",
"source": "http://www.rasmussenreports.com/public_content/politics/elections/election_2014/georgia/election_2014_georgia_senate",
"last_updated": "2014-07-25T18:04:21Z",
"partisan": "Nonpartisan",
"affiliation": "None",
"survey_houses": [
{
"name": "Rasmussen Reports",
"party": "N/A"
}
],
"sponsors": [],
"questions": [
{
"name": "2014 Georgia Senate: Perdue vs. Nunn",
"chart": "2014-georgia-senate-perdue-vs-nunn",
"topic": "2014-senate",
"state": "GA",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 750,
"margin_of_error": 4,
"responses": [
{
"choice": "Nunn",
"value": 40,
"first_name": "Michelle",
"last_name": "Nunn",
"party": "Dem",
"incumbent": false
},
{
"choice": "Perdue",
"value": 46,
"first_name": "David",
"last_name": "Perdue",
"party": "Rep",
"incumbent": false
},
{
"choice": "Other",
"value": 4,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Undecided",
"value": 10,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
},
{
"name": "Georgia: Obama Job Approval",
"chart": "georgia-obama-job-approval",
"topic": "obama-job-approval",
"state": "GA",
"subpopulations": [
{
"name": "Likely Voters",
"observations": 750,
"margin_of_error": 4,
"responses": [
{
"choice": "Strongly Approve",
"value": 27,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Somewhat Approve",
"value": 20,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Somewhat Disapprove",
"value": 6,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Strongly Disapprove",
"value": 44,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Undecided",
"value": 2,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
},
{
"id": 19927,
"pollster": "Gallup",
"start_date": "2014-07-22",
"end_date": "2014-07-24",
"method": "Phone",
"source": "http://www.gallup.com/poll/113980/Gallup-Daily-Obama-Job-Approval.aspx",
"last_updated": "2014-07-25T17:11:13Z",
"partisan": "Nonpartisan",
"affiliation": "None",
"survey_houses": [
{
"name": "Gallup Poll",
"party": "N/A"
}
],
"sponsors": [],
"questions": [
{
"name": "Obama Job Approval",
"chart": "obama-job-approval",
"topic": "obama-job-approval",
"state": "US",
"subpopulations": [
{
"name": "Adults",
"observations": 1500,
"margin_of_error": 3,
"responses": [
{
"choice": "Approve",
"value": 39,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
},
{
"choice": "Disapprove",
"value": 54,
"first_name": null,
"last_name": null,
"party": null,
"incumbent": null
}
]
}
]
}
]
}
]
Notes
The partisan field in the Polls response contains Sponsor when there is at least one partisan sponsor, and Pollster when there is a partisan pollster, but not a partisan sponsor.
When there are pollsters or sponsors with different partisanships, the poll is considered Nonpartisan.