Brand Studio docs
Engineering manualAPI route source

/api/search

Exact current route handler: hosted-app/app/api/search/route.ts

Methods: GET. Input signals: none detected. Literal response-status signals: none detected.

Source: hosted-app/app/api/search/route.ts. Imports: @/lib/docs-source, fumadocs-core/search/server. Exact source is shown for inspection; its presence does not prove authentication, validation or live behavior.

All API routes · API and execution contract

// FULL-TEXT SEARCH OVER THE DOCUMENTATION, WITH NO VENDOR.
//
// Fumadocs' built-in server search, built from the same loader the pages and
// the sidebar read (lib/docs-source.ts) — so a page that renders is a page that
// is findable, by construction rather than by a sync job.
//
// WHAT THE ENGINE ACTUALLY IS. Fumadocs 16 ships `zbsearch` as a direct
// dependency and does the indexing in-process; Orama is now one of several
// OPTIONAL adapters (@orama/core, Orama Cloud) for people who want a hosted
// index. This route therefore adds no dependency, sends no query to anyone
// else, and costs nothing per search. That is worth stating because the
// approved proposal said "ships search without a vendor" and this is the line
// where that is either true or it is not.
//
// The index is derived from each page's structured data, which the MDX compiler
// produces at build time. Nothing here reads a database or an account.

import { createFromSource } from "fumadocs-core/search/server";

import { source } from "@/lib/docs-source";

export const { GET } = createFromSource(source);