Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kagisearch/kite-public/llms.txt

Use this file to discover all available pages before exploring further.

Kagi News includes a full-text search modal that lets you find stories across every category in the currently loaded batch. The search runs locally against in-memory story data, returning results instantly as you type without any round-trips to a server. You can open the search modal two ways:
  • Press Cmd+K (macOS) or Ctrl+K (Windows/Linux)
  • Click the search icon in the navigation bar
Pressing Escape or clicking outside the modal closes it without navigating anywhere.

Typing a query

Start typing to search story titles and summaries. Results update live with each keystroke. The search is case-insensitive and matches partial words. Use the and arrow keys to move through results, then press Enter to open the highlighted story.
Search runs against the current batch only — the stories loaded in your active session. Stories from previous batches are not included. To browse historical news, use Time Travel instead.

Search results

Each result shows:
  • The story headline
  • The category the story belongs to
  • A short snippet highlighting the matched text
Results are ranked by relevance. The SearchResult type returned by the search service includes the matched fields and the category context:
interface SearchResult {
  story: SearchStory;      // The matched story, including matchedFields and snippet
  categoryId: string;      // Category the story belongs to
  categoryName: string;    // Human-readable category name
  batchId?: string;        // Present for historical results
  batchDate?: string;      // ISO date string for historical results
}

Search filters

The SearchFilter interface supports scoping a query to a specific category or date range:
interface SearchFilter {
  type: 'category' | 'date' | 'from' | 'to';
  value: string;
  display: string;
  isValid: boolean;
}
Filter typeDescription
categoryLimit results to a single category by ID
dateMatch stories from a specific date
fromMatch stories on or after a date
toMatch stories on or before a date

API endpoint

The search endpoint is also available for programmatic access:
GET /api/search?q=<query>
ParameterRequiredDescription
qYesThe search query string

Example

curl "https://kagi.com/news/api/search?q=artificial+intelligence"
The response returns an array of matching stories with their category metadata, following the same SearchResult shape used by the in-app search service.

Search state

The SearchService class maintains a SearchState object throughout the lifecycle of a search session:
interface SearchState {
  query: string;
  filters: SearchFilter[];
  results: SearchResult[];
  isLoading: boolean;
  isLoadingMore: boolean;
  hasMore: boolean;
  selectedIndex: number;
  totalCount: number;
  currentOffset: number;
  allHistoricalResults: SearchResult[];
}
The default result limit per search is 100 stories (DEFAULT_SEARCH_LIMIT). Active searches can be cancelled — for example when the user clears the query — using the internal AbortController on the SearchService instance.

Build docs developers (and LLMs) love