# GET /api/v1/public/blog/posts/{slug}

> Get a published blog post by slug

- **Tag:** blog-public
- **Operation ID:** `get_public_post_api_v1_public_blog_posts__slug__get`

## Description

Public, unauthenticated, cached fetch of one published post. Returns 404 for drafts, soft-deleted, or unknown slugs.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `slug` (path, string, required)

## Responses

### 200 — Successful Response

Schema: `BlogPostPublicResponse`

- `slug` (string · required)
- `title` (string · required)
- `excerpt` (string)
- `body_md` (string · required)
- `cover_image_url` (string)
- `cover_image_alt` (string)
- `seo_title` (string)
- `seo_description` (string)
- `published_at` (string · date-time · required)
- `updated_at` (string · date-time · required)
- `author_name` (string)
- `tags` (array · string)
- `related` (array · BlogPostPublicSummary) → `BlogPostPublicSummary` — Up to 3 related published posts (tag overlap, falling back to most-recent if no overlap exists).
  - `slug` (string · required)
  - `title` (string · required)
  - `excerpt` (string)
  - `cover_image_url` (string)
  - `cover_image_alt` (string)
  - `published_at` (string · date-time · required)
  - `author_name` (string)
  - `tags` (array · string)

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

### 429 — Too Many Requests - Rate limit exceeded

## Code samples

### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/public/blog/posts/{slug}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/public/blog/posts/{slug}', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.get("https://api.ondayzero.com/api/v1/public/blog/posts/{slug}", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/blog-public/get-public-post
- OpenAPI slice: https://www.ondayzero.com/docs/reference/blog-public/get-public-post/openapi.json
- Other endpoints in **blog-public**: https://www.ondayzero.com/docs/reference/blog-public
