API and Product Coverage
This document summarizes what the kagi CLI implements today, which auth path it uses, and which product settings are now manageable from the terminal.
Currently Implemented
Current V1 OpenAPI Endpoints
These endpoints come from Kagi's current OpenAPI contract at https://kagi.com/api/docs/openapi and use KAGI_API_KEY with Bearer auth:
| Endpoint | Command | Status |
|---|---|---|
Search API (POST /api/v1/search) | kagi search | ✅ Implemented for query, limit, and filters.region/after/before |
| Extract API | kagi extract | ✅ Implemented, including stdin URL filter mode |
Current V1 Search optional fields not exposed by this CLI: workflow, API response format, lens_id, inline lens, timeout, page, search-result extract, safe_search, and explicit personalization rule objects. Subscriber web-product features cover some adjacent workflows, but they are not represented as V1 OpenAPI request fields.
Legacy V0 APIs
These commands use Kagi's older public API surface with KAGI_API_TOKEN and Bot auth:
| Endpoint | Command | Status |
|---|---|---|
| Universal Summarizer | kagi summarize | ✅ Implemented |
| FastGPT | kagi fastgpt | ✅ Implemented |
| Web Enrichment (Teclis) | kagi enrich web | ✅ Implemented |
| News Enrichment (TinyGem) | kagi enrich news | ✅ Implemented |
Subscriber Web Product Features
These features use the subscriber web product with KAGI_SESSION_TOKEN:
| Feature | Command | Status |
|---|---|---|
| Base search | kagi search | ✅ Implemented |
| Snap-prefixed search | kagi search --snap | ✅ Implemented |
| Lens search | kagi search --lens | ✅ Implemented for numeric indexes and exact enabled lens names |
| Filtered search | kagi search --region/--from-date/--to-date on V1 API or session path; --time/--order/... on session path | ✅ Implemented |
| Quick Answer | kagi quick | ✅ Implemented |
| Web Summarizer | kagi summarize --subscriber | ✅ Implemented |
| Search result summarize pipeline | kagi search --follow | ✅ Implemented |
| Assistant prompt + thread management | kagi assistant | ✅ Implemented, including prompt contracts |
| Assistant terminal REPL | kagi assistant repl | ✅ Implemented |
| Custom assistant management | kagi assistant custom | ✅ Implemented |
| Ask questions about a page | kagi ask-page | ✅ Implemented |
| Translate (text mode) | kagi translate | ✅ Implemented |
| Lens settings | kagi lens | ✅ Implemented |
| Custom bang settings | kagi bang custom | ✅ Implemented |
| Redirect rule settings | kagi redirect | ✅ Implemented |
| Local domain preferences | kagi site-pref | ✅ Implemented locally |
Public Product Endpoints
These require no authentication:
| Endpoint | Command | Status |
|---|---|---|
| Kagi News | kagi news | ✅ Implemented |
| Small Web feed | kagi smallweb | ✅ Implemented |
| News categories | kagi news --list-categories | ✅ Implemented |
| Chaos index | kagi news --chaos | ✅ Implemented |
Command Coverage Summary
| Command | Description | Auth | Status |
|---|---|---|---|
search | Base Kagi search | API or Session | ✅ |
search --snap | Snap-prefixed search | API or Session | ✅ |
search --lens | Lens-aware search by numeric index or exact enabled name | Session | ✅ |
search with filters | Region, time, date, order, verbatim, personalization filters | Session | ✅ |
search --template | Lightweight result templates | API or Session | ✅ |
search --follow | Search plus subscriber summaries for top results | Session | ✅ |
batch | Parallel search with shared search options | API or Session | ✅ |
batch via stdin | Parallel search from stdin lines | API or Session | ✅ |
auth | Credential management | None | ✅ |
usage / billing | Account billing and calendar-month usage | Session | ✅ |
completion | Generate and install shell completions | None | Implemented |
--profile | Named auth profiles from the config file (~/.config/kagi-cli/config.toml) | None | ✅ |
summarize | Public API summarizer | API | ✅ |
summarize --subscriber | Web summarizer | Session | ✅ |
summarize --filter | Summarize stdin items as URLs or text | API or Session | ✅ |
extract | Extract page content as markdown or stdin URL JSONL records | API | ✅ |
watch | Search diff monitoring | API or Session | ✅ |
notify | Webhook notifications for search/news | API, Session, or None | ✅ |
history | Local history and stats | None | ✅ |
news | News feed and metadata | None | ✅ |
quick | Quick Answer | Session | ✅ |
assistant | AI assistant prompt + thread management | Session | ✅ |
assistant repl | Continuous Assistant conversation | Session | ✅ |
assistant custom | Saved assistant CRUD | Session | ✅ |
ask-page | Page-focused Assistant question | Session | ✅ |
translate | Kagi Translate text mode | Session | ✅ |
fastgpt | Fast answers | API | ✅ |
enrich web | Web enrichment | API | ✅ |
enrich news | News enrichment | API | ✅ |
smallweb | Small Web feed | None | ✅ |
mcp | Stdio MCP server for CLI-parity Kagi tools, with mutating tools gated by --enable-mutating-tools | API, Session, or None by tool | ✅ |
site-pref | Local domain preference list/set/remove | None | ✅ |
lens | Lens CRUD + enable/disable | Session | ✅ |
bang custom | Custom bang CRUD | Session | ✅ |
redirect | Redirect CRUD + enable/disable | Session | ✅ |
Output and Flag Coverage
Human-Readable Formats
| Command | Formats |
|---|---|
search | json, toon, compact, pretty, markdown, csv |
batch | json, toon, compact, pretty, markdown, csv |
quick | json, toon, compact, pretty, markdown |
assistant | json, toon, compact, pretty, markdown |
Search Options
| Option | Commands | Status |
|---|---|---|
--snap | search, batch | ✅ |
--lens | search, batch, quick | ✅ |
--region | search, batch | ✅ |
--time | search, batch | ✅ |
--from-date | search, batch | ✅ |
--to-date | search, batch | ✅ |
--order | search, batch | ✅ |
--verbatim | search, batch | ✅ |
--personalized / --no-personalized | search, batch, assistant | ✅ |
--template | search, batch | ✅ |
--local-cache / --cache-ttl | search, summarize, quick, fastgpt | ✅ |
--error-format | global | Implemented |
Assistant and Settings Options
| Option | Commands | Status |
|---|---|---|
--assistant | assistant | ✅ |
--contract / --contract-file | assistant | Implemented |
--thread-id | assistant | ✅ |
--model | assistant, assistant custom | ✅ |
--lens | assistant, assistant custom | ✅ |
--web-access / --no-web-access | assistant, assistant custom | ✅ |
thread list/get/delete/export | assistant | ✅ |
custom list/get/create/update/delete | assistant | ✅ |
repl | assistant | ✅ |
--filter | extract | Implemented |
list/get/create/update/delete | lens | ✅ |
enable / disable | lens, redirect | ✅ |
custom list/get/create/update/delete | bang | ✅ |
Live Verification
Live subscriber CRUD and round-trip tests were run against the real product flows for:
- custom assistants
- lenses
- custom bangs
- redirect rules
- assistant thread round-trip
After those tests, the account-level settings pages were checked directly to confirm cleanup and no leftover test data.
Not Available
Intentionally Excluded
- Account-synced domain preference writes are not exposed because Kagi does not document a stable public write API for Personalized Results.
- Kagi Translate document, image, website, proofread, dictionary, and voice modes are not exposed.
- Search-time safe-search overrides are not exposed. Safe-search remains an account setting.
Notes
- Base-search fallback to the session-token path only exists on
kagi searchandkagi batch, and only when API-first mode was selected. - Search filters and lens search remain session-only because they depend on Kagi's live web-product flow.
- Settings management currently targets Kagi's authenticated settings forms, not public API endpoints.