@mixpeek/search-js is a drop-in React component that connects to any published Mixpeek retriever. It provides a full search UI with keyboard shortcuts, filters, AI answers, and streaming results — no backend code required on your side.
Quick Start
1
Set up your search backend
Use the docs search quickstart to provision a complete pipeline in one API call, or create a retriever manually and publish it.
2
Install the widget
3
Add to your app
Cmd+K (or Ctrl+K) to open the search modal. Results stream in from your retriever pipeline.
Props
Callbacks
CDN Usage (No Build Step)
For sites without a build system, load the widget via CDN:Filters
The widget includes built-in filter components for facets, ranges, and LLM-powered smart filtering.Facet Filter
Single or multi-select dropdown:Range Filter
Numeric min/max slider:Smart Filter (LLM-based)
Natural language filtering powered by the retriever’s LLM filter stage:AI Answers
EnableenableAIAnswer to show an LLM-generated answer with citations above search results. This requires an agent_search or rag_prepare stage in your retriever.
Hooks
Access search state from any child component:useSearchKit, useSearch, useFilters, useKeyboardShortcut, useRecentSearches.
Setting Up the Backend
The widget needs a published retriever to connect to. There are two paths:Quickstart: Docs Search
Provision a complete search pipeline in one API call. This creates a namespace, bucket, collection (with web scraper + text embeddings), retriever, and published endpoint automatically:enable_code_search (default: true), enable_image_search (default: false), max_pages (default: 200), max_depth (default: 3).
Bootstrap CLI
The@mixpeek/react-searchkit package includes a CLI to scaffold a retriever with search, filter, and RAG stages:
feature_search, attribute_filter, and rag_prepare stages pre-configured.
Manual Setup
For full control, create each resource yourself:1
Create a namespace and bucket
Set up storage and enable the feature extractors you need (guide).
2
Create a collection
Configure a collection with a feature extractor (e.g.,
text_extractor, web_scraper, multimodal_extractor) and trigger processing on your data (guide).3
Create and publish a retriever
Build a retriever with the stages you need, then publish it to get a slug for the widget (guide).
Publishing a Retriever
Once you have a retriever, publish it to make it accessible to the widget:public_name becomes the projectKey you pass to the widget.
Authentication
The widget supports two authentication modes:Examples
The search widget is used on mixpeek.com as the site-wide search in the navigation bar, powered by@mixpeek/search-js with the mixpeek-blog-search retriever slug.
Exported Components
For building fully custom search experiences, the package exports composable sub-components:Related
Retrievers
Build the retriever pipeline behind your widget
Retriever Stages
Configure search, reranking, and enrichment stages
Interactions
Use interaction data to improve search relevance
JavaScript SDK
Full SDK for programmatic access

