Get Poll Results via API
Fetching poll results are fairly easy. The results are always
delivered in realtime and the response contains JSON formatted
data with the poll information as well es a timestamp in
UNIX-time. Keep in mind that JSON fields are not sorted, so they
can are returned in random order.
GET
https://strawpoll.com/api/poll/<<id>>
(replace <<id>> with any poll id)
Response (Example):
GET
https://strawpoll.com/api/poll/rae5gcp1
{"id":"rae5gcp1","poll_answers":[{"answer":"Super easy","id":"3h8kcprp9448","sorting":1,"type":"text","votes":35},{"answer":"Somewhat easy","id":"4c6drcgb4yay","sorting":2,"type":"text","votes":3},{"answer":"Moderate","id":"47ry2yc6ad21","sorting":3,"type":"text","votes":6},{"answer":"Quite difficult","id":"kzhyffc39shs","sorting":4,"type":"text","votes":3},{"answer":"Very difficult","id":"8gxgye81zyp8","sorting":5,"type":"text","votes":7}],"success":1,"title":"How easy is embedding a StrawPoll?","total_votes":54}
If the poll creator decided to hide the poll results from public, you can use an API key (read more unter Authentication) to gain the appropriate access rights.