# Get all votes on a poll

Having all the information is great, with Polls API you can get all the Votes on the polls easily.

> We love our servers, like everyone else, which is why this API sends our paginated response. You can pass in **offset & limit** to fetch votes in bulk as pages.&#x20;
>
> There is a max limit of 100, so even if you pass *`?limit=150`  it will only send at max 100.*

## Get all votes

<mark style="color:blue;">`GET`</mark> `https://api.pollsapi.com/v1/get/votes/{poll_id}?offset=0&limit=25`

This endpoint allows you to fetch paginated response for all the Votes on a poll.

#### Path Parameters

| Name     | Type   | Description    |
| -------- | ------ | -------------- |
| poll\_id | string | ID of the Poll |

#### Query Parameters

| Name   | Type   | Description                              |
| ------ | ------ | ---------------------------------------- |
| offset | number | Number of items to be skipped            |
| limit  | number | Number of items to be fetched (Max: 100) |

#### Headers

| Name    | Type   | Description              |
| ------- | ------ | ------------------------ |
| api-key | string | API Key for your account |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "status": "success",
  "statusCode": 200,
  "data": {
    "docs": [
      {
        "identifier": "user_12",
        "poll_id": "5f9f7b186477891e5bc646a1",
        "option_id": "5f9f7b186477891e5bc646a2",
        "created_at": "2020-11-02T06:24:24.760Z",
        "updated_at": "2020-11-02T06:24:24.760Z",
        "id": "5f9fa6186477891e5bc646a5",
        "entity": "Vote"
      }
    ],
    "totalDocs": 1,
    "offset": 0,
    "limit": 10,
    "totalPages": 1,
    "page": 1,
    "pagingCounter": 1,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": null,
    "nextPage": null
  }
}

```

{% endtab %}
{% endtabs %}

### Example cURL Request

```bash
curl https://api.pollsapi.com/v1/get/votes/5f93915e7e044c74074f072e?offset=0&limit=10 \
  -H "content-type: application/json" \
  -H "api-key: $API_KEY"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pollsapi.com/api/get-all-votes-on-a-poll.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
