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

# Search with a named profile

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

## `GET /search/:profileSlug`

**Search with a named profile**

Searches the site with a named search profile. The payload is that of
`/search`, with ranking, fields and facets scoped to `:profileSlug`.
Use `/search/profiles` to list the public profiles. Every hit field,
`id` and `path` included, can be absent. With `market` (a `mkt_` id),
the products hidden in that market are left out.

`locale` and `fallback` work as on `/search`, and `fallback` defaults
to `true`. A `fallback` that is not a boolean returns 422. Returns 403
`AUTHZ_PERMISSION_DENIED` for a profile that is not public, 404
`RESOURCE_NOT_FOUND` for an unknown slug, and 503
`INTERNAL_SERVICE_UNAVAILABLE` when search is not available.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `profileSlug` | path | string | Yes | Slug of the named search profile |
| `q` | query | string | No | Full-text search query string. Min 1 character |
| `locale` | query | string | No | BCP 47 locale code (e.g. "en", "fr") |
| `fallback` | query | boolean (default true) | No | With `locale`, `false` leaves out the items not translated into the requested locale. Single-language sites ignore it |
| `market` | query | string | No | Market `mkt_` id: products hidden in that market are left out. An unknown, draft or malformed value is ignored |
| `category` | query | string | No | Keeps only the contents in the category with this slug |
| `tag` | query | string | No | Keeps only the contents carrying the tag with this slug |
| `page` | query | number (min 1, default 1) | No | Page number, starting at 1 |
| `limit` | query | number (min 1) | No | Hits per page. Defaults to the search profile's `defaultLimit`. A value above its `maxLimit` is lowered to it, and a non-numeric one uses the default |


### Responses

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


> **Notes:** Never cached (`no-store`). Rate-limit bucket: general.

### SDK

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

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

const results = await lynkow.search.searchByProfile('api-docs', 'pagination', {
  limit: 10,
})
```

### Examples

```curl
curl "https://api.lynkow.com/storefront/{siteId}/search/docs?q=consent"
```

```javascript
const res = await fetch(`https://api.lynkow.com/storefront/${siteId}/search/docs?q=consent`)
const { data, meta } = await res.json()
```

### Response Example

```json
{
  "data": [
    {
      "id": "01J9YPWQ3KTNB4F8C7H6D2R5XA",
      "title": "Cookie consent",
      "slug": "cookie-consent",
      "excerpt": "How to wire the cookie-consent widget in your app.",
      "locale": "en",
      "type": "content",
      "_formatted": {
        "title": "Cookie <mark>consent</mark>"
      }
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "totalPages": 1,
    "perPage": 20,
    "query": "consent",
    "processingTimeMs": 4,
    "profile": "docs",
    "facetDistribution": {
      "type": {
        "content": 1
      }
    }
  }
}
```

---