> For the complete documentation index, see [llms.txt](https://docs.elections.openknowledge.be/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elections.openknowledge.be/api/api/candidates.md).

# Candidates

## Get candidates

<mark style="color:blue;">`GET`</mark> `https://api.elections.openknowledge.be/candidates/:year/:type[/:id]`

This endpoint allows you to get information about candidates.\
If you need a list of available elections types, see Types.

#### Path Parameters

| Name | Type    | Description                        |
| ---- | ------- | ---------------------------------- |
| year | integer | Year of the elections.             |
| type | string  | Type of the elections (see Types). |
| id   | integer | ID of the candidate.               |

#### Query Parameters

| Name | Type    | Description                             |
| ---- | ------- | --------------------------------------- |
| test | boolean | Use **test** data instead of real data. |

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

```javascript
```

{% endtab %}
{% endtabs %}

{% content-ref url="/pages/-LfuBBN2cKgblfWKj6eT" %}
[Types](/more-information/types.md)
{% endcontent-ref %}

## Get candidates by list

<mark style="color:blue;">`GET`</mark> `https://api.elections.openknowledge.be/candidates/:year/:type/list/:list`

This endpoint allows you to get information about candidates filtered by list.\
If you need a list of available elections types, see Types.

#### Path Parameters

| Name | Type    | Description                        |
| ---- | ------- | ---------------------------------- |
| year | integer | Year of the elections.             |
| type | string  | Type of the elections (see Types). |
| list | integer | ID of the list.                    |

#### Query Parameters

| Name  | Type    | Description                                                    |
| ----- | ------- | -------------------------------------------------------------- |
| test  | boolean | Use **test** data instead of real data.                        |
| final | boolean | Use **final** test data instead of **intermediate** test data. |

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

```javascript
```

{% endtab %}
{% endtabs %}

{% content-ref url="/pages/-LfuBBN2cKgblfWKj6eT" %}
[Types](/more-information/types.md)
{% endcontent-ref %}

## Get candidates by group

<mark style="color:blue;">`GET`</mark> `https://api.elections.openknowledge.be/candidates/:year/:type/group/:group`

This endpoint allows you to get information about candidates filtered by group.\
If you need a list of available elections types, see Types.

#### Path Parameters

| Name  | Type    | Description                        |
| ----- | ------- | ---------------------------------- |
| year  | integer | Year of the elections.             |
| type  | string  | Type of the elections (see Types). |
| group | integer | ID of the group.                   |

#### Query Parameters

| Name  | Type    | Description                                                    |
| ----- | ------- | -------------------------------------------------------------- |
| test  | boolean | Use **test** data instead of real data.                        |
| final | boolean | Use **final** test data instead of **intermediate** test data. |

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

```javascript
```

{% endtab %}
{% endtabs %}

{% content-ref url="/pages/-LfuBBN2cKgblfWKj6eT" %}
[Types](/more-information/types.md)
{% endcontent-ref %}

## Get candidates by entity

<mark style="color:blue;">`GET`</mark> `https://api.elections.openknowledge.be/candidates/:year/:type/entity/:entity`

This endpoint allows you to get information about candidates filtered by entity.\
If you need a list of available elections types, see Types.

#### Path Parameters

| Name   | Type    | Description                        |
| ------ | ------- | ---------------------------------- |
| year   | integer | Year of the elections.             |
| type   | string  | Type of the elections (see Types). |
| entity | integer | ID of the entity.                  |

#### Query Parameters

| Name  | Type    | Description                                                    |
| ----- | ------- | -------------------------------------------------------------- |
| test  | boolean | Use **test** data instead of real data.                        |
| final | boolean | Use **final** test data instead of **intermediate** test data. |

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

```javascript
```

{% endtab %}
{% endtabs %}

{% content-ref url="/pages/-LfuBBN2cKgblfWKj6eT" %}
[Types](/more-information/types.md)
{% endcontent-ref %}
