# Tags

> List a site's tags with post counts, and fetch one tag's details.

## List tags

```endpoint
GET /sites/{siteId}/tags
```

Returns every tag on the site. `postCount` is the number of published posts using it.

```bash
curl https://api.quillhive.com/api/public/v1/sites/YOUR_SITE_ID/tags
```

```json title="Response"
{
  "tags": [
    {
      "id": "clx123...",
      "name": "Engineering",
      "slug": "engineering",
      "description": "How we build things",
      "postCount": 12
    }
  ]
}
```

## Get a tag

```endpoint
GET /sites/{siteId}/tags/{slug}
```

Returns one tag with its feature image and SEO fields, for a tag page.

```bash
curl https://api.quillhive.com/api/public/v1/sites/YOUR_SITE_ID/tags/engineering
```

```json title="Response"
{
  "tag": {
    "id": "clx123...",
    "name": "Engineering",
    "slug": "engineering",
    "description": "How we build things",
    "featureImage": "https://...",
    "metaTitle": "Engineering | Field Notes",
    "metaDescription": "How the Field Notes team builds things"
  }
}
```

A missing tag returns `404` with `{ "tag": null }`.

For the tag's posts, call [List posts](/docs/api/posts#list-posts) with `?tag=engineering`.
