> For the complete documentation index, see [llms.txt](https://tutyamxx.gitbook.io/romanian-jokes-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tutyamxx.gitbook.io/romanian-jokes-api-docs/get-all-jokes-filtered-by-category.md).

# GET - All Jokes Filtered by Category

➡️ This will be the endpoint in retrieving Romanian jokes filtered by their respective categories

## Get all the jokes filtered by category

<mark style="color:blue;">`GET`</mark> `https://romanian-jokes-api.herokuapp.com/v1/romanianjokes/filter/:joketype`

This endpoint allows you to get all the existing jokes filtered by their respecting categories

#### Path Parameters

| Name           | Type   | Description                     |
| -------------- | ------ | ------------------------------- |
| /romanianjokes | string | Obligatory path                 |
| /filter        | string | Path towards the joke filtering |

#### Query Parameters

| Name     | Type   | Description                                                          |
| -------- | ------ | -------------------------------------------------------------------- |
| joketype | string | The joke category you want to filter (must be a valid joke category) |

{% tabs %}
{% tab title="200 All the Romanian jokes by the specified category (in this case: seci) successfully retrieved.
❗ Below is just an example; the JSON response is very large ❗" %}

```
[
    {
        "id": 30,
        "joketype": "seci",
        "joke": "De ce are rinocerul corn? Pentru că nu a găsit chiflă."
    },
    {
        "id": 31,
        "joketype": "seci",
        "joke": "Ce trebuie să îi faci unui hipopotam care are diaree? Loc!"
    },
    {
        "id": 32,
        "joketype": "seci",
        "joke": "Cum se uită o raţă în beci? Iei raţa, o duci în beci şi o uiţi acolo."
    },
    ...
]
```

{% endtab %}

{% tab title="404 Could not find the joke category matching this query." %}

```
{
    "message": "This joke type could not be found in the jokes list"
}
```

{% endtab %}
{% endtabs %}
