---
name: kagi-7b2b07bcc1e1
description: Use the Kagi API (Search API + FastGPT) for web research when you want higher-quality results than Brave/Google, or when Brave Search is rate-limited. Triggers: “search with Kagi”, “Kagi search”, “use FastGPT”, “Kagi FastGPT”, “Kagi summarize”, or when you want programmatic web search via Kagi’s API token.
---

# Kagi (API)

Use the bundled Python scripts to call Kagi’s API from the OpenClaw host.

## Quick start

1) Create a token in https://kagi.com/settings/api
2) Export it for your shell/session:

```bash
export KAGI_API_TOKEN='…'
```

3) Run a search:

```bash
python3 scripts/kagi_search.py "haaps glass" --limit 10 --json
```

4) Or ask FastGPT (LLM + web search):

```bash
python3 scripts/kagi_fastgpt.py "Summarize the latest Haaps glass mentions" --json
```

## Tasks

### 1) Web search (Kagi Search API)

Use when you need a normal ranked list of results (URLs/titles/snippets).

Command:

```bash
python3 scripts/kagi_search.py "<query>" [--limit N] [--json]
```

Notes:
- Defaults to printing a readable digest; use `--json` for raw API output.
- The script automatically sets `Authorization: Bot <token>`.

### 2) Answer/summarize with citations (FastGPT)

Use when you want a short answer grounded in web results, including reference URLs.

Command:

```bash
python3 scripts/kagi_fastgpt.py "<question>" [--cache true|false] [--json]
```

### 3) Using Kagi as a drop-in for web_search

If Brave Search is rate-limited (429) or you want better results:
- Use `scripts/kagi_search.py` to fetch results
- Then use the main agent model to synthesize / summarize based on the returned URLs/snippets

## Files

- API reference snippets: `references/kagi-api.md`
- Python client + CLIs: `scripts/kagi_client.py`, `scripts/kagi_search.py`, `scripts/kagi_fastgpt.py`


---
Source attribution: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/michaelasper/kagi/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2026 clawdbot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/michaelasper/kagi/SKILL.md
Attribution basis: Source repository record

Fields of work: Education & Research, Marketing
Roles: Content Marketer, Marketing Analyst, Researcher
Specialties: API
Tools: Kagi
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: eb397b417c7d0f535a995b129c53742e9276ce8a717333f33cf663aecbd6e042
