# Search contents

**Publié le** : 2026-05-08
**Catégorie** : Core CMS

## `GET /contents/search`

**Search contents**

Full-text search across content titles, slugs, and bodies. Returns
matching contents with highlighted search terms.

More powerful than the `search` query param on the list endpoint —
this performs full-text search with ranking.

Required permissions: `contents.view`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | number | No | Number |
| `limit` | query | number | No | Number <= 200 |
| `search` | query | string | No | Full-text search query |
| `type` | query | string | No | Resource type |
| `status` | query | "draft" \| "published" \| "archived" \| "scheduled" | No | One of: draft, published, archived, scheduled |
| `contentMode` | query | "standard" \| "structured" | No | One of: standard, structured |
| `sortBy` | query | "created_at" \| "updated_at" \| "published_at" \| "title" \| "slug" \| "display_order" | No | One of: created_at, updated_at, published_at, title, slug, display_order |
| `sortOrder` | query | "asc" \| "desc" | No | One of: asc, desc |
| `categoryIds` | query | string[] | No | Array of strings |
| `tagIds` | query | string[] | No | Array of strings |
| `authorId` | query | string | No | Author user ID |
| `dateFrom` | query | string | No | Filter from date (ISO 8601) |
| `dateTo` | query | string | No | Filter until date (ISO 8601) |
| `publishedFrom` | query | string | No | Filter by publish date from (ISO 8601) |
| `publishedTo` | query | string | No | Filter by publish date until (ISO 8601) |
| `slug` | query | string | No | URL-friendly identifier, unique per site and locale |
| `slugs` | query | string[] | No | Array of strings |
| `ids` | query | string[] | No | Array of strings |
| `excludeIds` | query | string[] | No | Array of strings |
| `hasCategory` | query | boolean | No | Boolean |
| `hasTag` | query | boolean | No | Boolean |
| `locale` | query | string | No | BCP 47 locale code (e.g. "en", "fr") |
| `translationGroupId` | query | string | No | Translation group UUID (links translations across locales) |
| `groupByTranslation` | query | boolean | No | Boolean |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Unauthorized — invalid or missing API token |
| `403` | Forbidden — insufficient permissions |


### Examples

```bash
curl "https://api.lynkow.com/v1/contents/search?q=getting+started&status=published" \
  -H "Authorization: Bearer $API_TOKEN"
```

### Response Example

```json
{
  "data": [
    {
      "id": 42,
      "title": "Getting Started with Lynkow",
      "slug": "getting-started-with-lynkow",
      "type": "post",
      "status": "published",
      "excerpt": "Learn how to set up your first headless CMS with Lynkow.",
      "locale": "en",
      "categories": [
        {
          "id": 1,
          "name": "Tutorials",
          "slug": "tutorials"
        }
      ],
      "tags": [
        {
          "id": 5,
          "name": "Getting Started",
          "slug": "getting-started"
        }
      ],
      "author": {
        "id": 1,
        "fullName": "Jane Doe"
      },
      "publishedAt": "2025-03-15T10:30:00.000Z",
      "createdAt": "2025-03-14T08:00:00.000Z",
      "updatedAt": "2025-03-15T10:30:00.000Z"
    }
  ],
  "meta": {
    "total": 3,
    "perPage": 15,
    "currentPage": 1,
    "lastPage": 1
  }
}
```

---