# Tags

## Get a list of tags

<mark style="color:blue;">`GET`</mark> `https://api.lolwallpapers.net/beta/tags`

#### Query Parameters

| Name    | Type   | Description                                                                                                     |
| ------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| search  | string | Search through all tags names (not strict)                                                                      |
| exclude | array  | An array of tags names to exclude from the result.                                                              |
| sort    | string | <p>Sort by:<br>- name<br>- wallpapers<br>- views<br>- downloads<br>- created\_at (default)<br>- updated\_at</p> |
| order   | string | <p>Order by:<br>- asc<br>- desc (default)</p>                                                                   |
| limit   | string | <p>The amount of tags to display per page.<br>Default: 20<br>Minimum: 1<br>Maximum: 50</p>                      |
| page    | string | <p>The page to display.<br>Default: 1<br>Minimum: 1</p>                                                         |

{% tabs %}
{% tab title="200 Tags successfully retrieved." %}

```
{
    "status": "success",
    "data": [
        {
            "name": "triple screen",
            "parent": null,
            "children": null,
            "wallpapers": 1,
            "created_by": {
                "id": "Q6lB",
                "display_name": "Administrator"
            },
            "created_at": 1596651707,
            "updated_at": 1596651707
        }
    ]
}
```

{% endtab %}

{% tab title="400 Validation failed." %}

```
{
    "status": "fail",
    "data": {
        "order": [
            "The value you selected is not a valid choice."
        ]
    }
}
```

{% endtab %}
{% endtabs %}

## Get a tag

<mark style="color:blue;">`GET`</mark> `https://api.lolwallpapers.net/beta/tags/:name`

#### Path Parameters

| Name | Type   | Description     |
| ---- | ------ | --------------- |
| name | string | The tag's name. |

{% tabs %}
{% tab title="200 Tag successfully retrieved." %}

```
{
    "status": "success",
    "data": {
        "name": "triple screen",
        "parent": null,
        "children": null,
        "wallpapers": 1,
        "created_by": {
            "id": "Q6lB",
            "display_name": "Administrator"
        },
        "created_at": 1596651707,
        "updated_at": 1596651707
    }
}
```

{% endtab %}

{% tab title="404 Tag not found." %}

```
{
    "status": "success",
    "data": "Not Found."
}
```

{% endtab %}
{% endtabs %}
