Commands
kagi ask-page
Ask Kagi Assistant about a specific web page and return the new thread plus the answer as JSON.

Synopsis
kagi ask-page <URL> <QUESTION>Description
The kagi ask-page command starts a new Assistant thread focused on one page URL. It mirrors the live Kagi web flow used by "Continue in Assistant" from search results, but packages it as a direct CLI command.
The response includes:
- stream metadata
- the normalized source URL and question
- the created Assistant thread
- the Assistant reply payload
Use this command when you want page-specific follow-up without manually pasting the URL into a browser Assistant session.
Authentication
Required: KAGI_SESSION_TOKEN
This command uses the subscriber Assistant web-product flow.
Arguments
<URL> (Required)
Absolute page URL to discuss.
Constraints:
- must be an absolute
httporhttpsURL - empty values are rejected
Examples:
kagi ask-page https://rust-lang.org/ "What is this page about?"
kagi ask-page https://kagi.com "Summarize the main product pitch"<QUESTION> (Required)
Question to ask about the page.
Examples:
kagi ask-page https://rust-lang.org/ "What learning resources does this page link to?"
kagi ask-page https://example.com "Give me the core claim in one sentence"Output Format
{
"meta": {},
"source": {
"url": "https://rust-lang.org/",
"question": "What is this page about?"
},
"thread": {
"id": "thread-1",
"title": "Rust Programming Language Website",
"created_at": "2026-03-19T17:58:59Z"
},
"message": {
"id": "turn-1",
"thread_id": "thread-1",
"state": "done",
"prompt": "https://rust-lang.org/\nWhat is this page about?",
"markdown": "This page is about the Rust programming language."
}
}Examples
Basic Usage
kagi ask-page https://rust-lang.org/ "What is this page about?"Extract Only the Answer
kagi ask-page https://rust-lang.org/ "What is this page about?" \
| jq -r '.message.markdown'Continue the Thread in Assistant
THREAD_ID=$(
kagi ask-page https://rust-lang.org/ "What is this page about?" \
| jq -r '.thread.id'
)
kagi assistant --thread-id "$THREAD_ID" "What learning resources does it mention?"Save a Page Analysis
kagi ask-page https://example.com "Summarize the main argument" > page-analysis.jsonError Cases
Typical configuration errors:
Config error: ask-page URL cannot be empty
Config error: invalid ask-page URL: relative URL without a base
Config error: ask-page URL must use http or https, got `file`
Config error: ask-page question cannot be emptyNotes
ask-pagealways starts a new Assistant thread in this version.- For follow-up questions, continue the returned thread with
kagi assistant --thread-id .... - The Assistant response keeps the combined prompt in
message.prompt, whilesource.urlandsource.questionpreserve the original CLI inputs separately.