# Get all polls

You might have a case where you would need to fetch all the Polls and maybe show it as a Feed or maybe for your own Dashboard. You can easily do this with our *get all polls* API. Check it out below on how to use it.

> We love our servers, like everyone else, which is why this API sends our paginated response. You can pass in **offset & limit** to fetch polls 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 polls

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

This endpoint allows you to get all polls as a paginated response.

#### 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": [
      {
        "data": "null",
        "identifier": null,
        "question": "Do you like polls?",
        "created_at": "2020-11-02T03:20:56.842Z",
        "updated_at": "2020-11-02T03:20:56.842Z",
        "id": "5f9f7b186477891e5bc646a1",
        "entity": "Poll",
        "options": [
          {
            "data": "null",
            "text": "Yes",
            "votes_count": 0,
            "poll_id": "5f9f7b186477891e5bc646a1",
            "created_at": "2020-11-02T03:20:56.872Z",
            "updated_at": "2020-11-02T03:20:56.872Z",
            "id": "5f9f7b186477891e5bc646a2",
            "entity": "Option"
          },
          {
            "data": "null",
            "text": "No",
            "votes_count": 0,
            "poll_id": "5f9f7b186477891e5bc646a1",
            "created_at": "2020-11-02T03:20:56.872Z",
            "updated_at": "2020-11-02T03:20:56.872Z",
            "id": "5f9f7b186477891e5bc646a3",
            "entity": "Option"
          }
        ]
      }
    ],
    "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/polls?offset=0&limit=10 \
  -H "content-type: application/json" \
  -H "api-key: $API_KEY"
```
