
# List tags

List every tag on the site, with page counts and any metadata (display casing, description).

```sh
GET https://sitepaste.com/api/v1/public/sites/{siteId}/tags
```

Requires the `content` scope.

## Usage

```bash
curl "https://sitepaste.com/api/v1/public/sites/default/tags" \
  -H "Authorization: Bearer $TOKEN"
```

## Authorizations

| Header | Type | Required | Description |
|--------|------|----------|-------------|
| Authorization | string | Yes | Bearer token (`Authorization: Bearer sp_...`). Created in the dashboard under Account > Tokens. See [authentication](/api/authentication). |


## Query parameters

This collection is returned whole. It takes no `limit` or `offset`, and sending
either answers 422.

## Response

```json
{ "tags": [ { "slug": "guides", "title": "Guides & Tips", "description": "How-to posts", "pageCount": 4 } ] }
```

`tags` is always an array, and holds every tag a page carries and every tag given a title or description. A tag with neither comes back with `title` and `description` as empty strings.

| Field | Type | Description |
|-------|------|-------------|
| slug | string | The tag, lowercased, with spaces as hyphens. |
| title | string | Display casing, empty when unset. |
| description | string | Tag page description, empty when unset. |
| pageCount | number | How many pages carry the tag. |