SearchConfig

Interface

Configuration for client-side direct search.

Returned by lynkow.search.getConfig(). Use these values to initialize a search client in the browser for instant autocomplete without round-tripping through your server.

Property

Type

Optional

Description

apiKey

string

No

Short-lived tenant token (JWT, 1-hour expiry) scoped to your site's index

host

string

No

Public search host URL (e.g. 'https://search.lynkow.com')

indexName

string

No

Your site's search index name


SearchHit

Interface

A single search result (hit) returned by Lynkow Instant Search.

Contains article metadata, URL path, and optional highlighted matches. Only published content appears in search results.

Property

Type

Optional

Description

_formatted

Record<string, string>

Yes

Highlighted matches with <em> tags around matching terms.<br>Only present when the search engine returns formatted results.<br>Keys match the field names (e.g. title, excerpt, body).

authorName

string

No

Full name of the content author

categories

{ name: string; slug: string }[]

No

Categories assigned to this content

excerpt

string

No

Short summary / excerpt

featuredImage

string | null

No

Featured image URL, or null if none

id

string

No

Content UUID

locale

string

No

Content locale code (e.g. 'fr', 'en')

metaDescription

string

No

SEO meta description

metaTitle

string

No

SEO meta title

path

string

No

Full URL path including locale and category prefix (e.g. '/fr/guides/forms')

publishedAt

number

No

Publication date as Unix timestamp (seconds)

slug

string

No

URL slug

tags

{ name: string; slug: string }[]

No

Tags assigned to this content

title

string

No

Article title

type

string

No

Content type (e.g. 'post')

updatedAt

number

No

Last update date as Unix timestamp (seconds)


SearchOptions

Interface

Options for lynkow.search.search().

All filters are optional. When omitted, searches across all published content in all locales.

Extends: BaseRequestOptions

Property

Type

Optional

Description

category

string

Yes

Filter by category slug (e.g. 'guides'). Omit to search all categories.

fetchOptions

RequestInit

Yes

Raw fetch() options merged into this specific request.<br>Useful for setting Next.js cache directives (next: { revalidate: 60 })<br>or custom headers on a per-request basis.<br>These options are shallow-merged with the client-level fetchOptions.

limit

number

Yes

Results per page (1--100). Defaults to 20.

locale

string

Yes

Filter by locale code (e.g. 'fr', 'en'). Omit to search all locales.

page

number

Yes

Page number (1-based). Defaults to 1.

tag

string

Yes

Filter by tag slug (e.g. 'featured'). Omit to search all tags.


SearchResponse

Interface

Response from lynkow.search.search().

Contains an array of matching articles and pagination metadata.

Property

Type

Optional

Description

data

SearchHit[]

No

Array of matching articles, ordered by relevance

meta

{ page: number; perPage: number; processingTimeMs: number; query: string; total: number; totalPages: number }

No

Pagination and query metadata