> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# Get a content by slug

**Published**: 2026-11-30
**Category**: Content

## `GET /contents/slug/:slug`

**Get a content by slug**

Fetches a published content entry by slug, with its rendered body,
SEO fields, custom data and structured data. Only published entries
are served.

With `locale`, the entry is served through the locale chain, so a
missing translation is a 200 with the fallback row. A fallback item
has empty `alternates`, and its `canonicalPath` is the URL of the
default-locale version. On a multi-language site, `fallback=false`
returns 404 `RESOURCE_NOT_FOUND` when no published row holds the
slug in the requested locale. Without `locale`, a slug shared by
several translations returns the default-locale one, else the oldest.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `slug` | path | string | Yes | URL-friendly identifier, unique per site and locale |
| `locale` | query | string | No | BCP 47 locale code (e.g. "en", "fr") |
| `fallback` | query | boolean (default true) | No | With `locale`, `false` returns 404 when the item is not translated into the requested locale. Single-language sites ignore it |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `402` | The site subscription does not currently permit this operation |
| `404` | Not found |
| `422` | Validation error |


> **Notes:** Cache: `Cache-Control: public, max-age=0, s-maxage=300`. Rate-limit
> bucket: general.

### SDK

```typescript
import { createClient } from 'lynkow'

const lynkow = createClient({ siteId: process.env.LYNKOW_SITE_ID! })

const content = await lynkow.contents.getBySlug('my-article')
console.log(content.title)          // Article title
console.log(content.body)           // HTML body string
console.log(content.author?.fullName) // Author name
console.log(content.categories)     // Associated categories
```

### Examples

```curl
curl "https://api.lynkow.com/storefront/{siteId}/contents/slug/how-we-set-our-pricing?locale=en"
```

```javascript
const res = await fetch(`https://api.lynkow.com/storefront/${siteId}/contents/slug/how-we-set-our-pricing?locale=en`)
const { data } = await res.json()
```

### Response Example

```json
{
  "data": {
    "id": "9b2c1e7a-4f3d-4a1b-9c2e-8d7f6a5b4c3d",
    "type": "post",
    "title": "How we set our pricing",
    "slug": "how-we-set-our-pricing",
    "path": "/guides/how-we-set-our-pricing",
    "canonicalPath": "/guides/how-we-set-our-pricing",
    "locale": "en",
    "requestedLocale": "en",
    "isFallback": false,
    "excerpt": "A behind-the-scenes look at the pricing model.",
    "body": "<p>Our pricing model is built around three principles...</p>",
    "status": "published",
    "displayOrder": 0,
    "metaTitle": "How we set our pricing | Acme",
    "metaDescription": "The principles behind Acme pricing.",
    "keywords": "pricing, saas",
    "canonicalUrl": null,
    "featuredImage": "https://cdn.lynkow.com/sites/acme/pricing-cover.jpg",
    "featuredImageVariants": {
      "thumbnail": "https://cdn.lynkow.com/sites/acme/pricing-cover.jpg?preset=thumbnail",
      "card": "https://cdn.lynkow.com/sites/acme/pricing-cover.jpg?preset=card",
      "medium": "https://cdn.lynkow.com/sites/acme/pricing-cover.jpg?preset=medium",
      "content": "https://cdn.lynkow.com/sites/acme/pricing-cover.jpg?preset=content",
      "hero": "https://cdn.lynkow.com/sites/acme/pricing-cover.jpg?preset=hero",
      "og": "https://cdn.lynkow.com/sites/acme/pricing-cover.jpg?preset=og"
    },
    "ogImage": "https://cdn.lynkow.com/sites/acme/og/pricing-blog.png",
    "ogImageVariants": {
      "og": "https://cdn.lynkow.com/sites/acme/og/pricing-blog.png?preset=og"
    },
    "authorName": null,
    "authorUrl": null,
    "author": {
      "id": "3f1a7c9e-2b4d-4e6f-8a1b-0c2d3e4f5a6b",
      "fullName": "Ada Lovelace",
      "avatarUrl": null
    },
    "categories": [
      {
        "id": "01a2b3c4-d5e6-4f70-8a1b-2c3d4e5f6071",
        "name": "Guides",
        "slug": "guides",
        "parentId": null,
        "parent": null
      }
    ],
    "tags": [
      {
        "id": "aa11bb22-cc33-4d44-9e55-6f7788990011",
        "name": "pricing",
        "slug": "pricing"
      }
    ],
    "alternates": [
      {
        "locale": "en",
        "path": "/guides/how-we-set-our-pricing",
        "current": true
      },
      {
        "locale": "fr",
        "path": "/fr/guides/comment-nous-fixons-nos-prix",
        "current": false
      }
    ],
    "customData": null,
    "meta": {},
    "structuredData": {},
    "jsonLdGraph": [],
    "faqSettings": null,
    "publishedAt": "2026-05-05T08:00:00.000Z",
    "createdAt": "2026-05-01T09:00:00.000Z",
    "updatedAt": "2026-05-05T08:00:00.000Z"
  }
}
```

---