Web search and content retrieval via the s1 command-line tool (search1api-cli).
Before using any command, check if s1 is available. If not, guide the user to install it:
npm install -g search1api-cli
An API key is also required. Get one at https://search1api.com, then configure:
s1 config set-key <your-api-key>
Or set the environment variable SEARCH1API_KEY.
If a command fails with "command not found" or an auth error, remind the user to complete these setup steps before retrying.
| User intent | Command |
|---|---|
| --- | --- |
| Shares a URL / link → read and summarize | s1 crawl |
| Wants to search the web | s1 search " |
| Wants news | s1 news " |
| Wants to explore a site's links | s1 sitemap |
| Wants trending topics | s1 trending |
| Wants deep thinking on a problem | s1 reasoning " |
| Wants to check remaining credits | s1 balance |
Adapt parameters to user intent — don't just use defaults:
-n 5, no crawl-n 15, then crawl top 3–5 results with separate s1 crawl calls-n-t day or -t month-s reddit, -s github, etc.--include arxiv.org-s baidu for better resultss1 search "<query>" [options]
| Option | Description | Default |
|---|---|---|
| --- | --- | --- |
-n, --max-results | Number of results (1–50) | 10 |
-s, --service | Search engine | |
-c, --crawl | Crawl N results for full content | 0 |
--include | Only include these sites | |
--exclude | Exclude these sites | |
-t, --time | day, month, year | |
--json | Raw JSON output |
Search engines: google, bing, duckduckgo, yahoo, x, reddit, github, youtube, arxiv, wechat, bilibili, imdb, wikipedia
s1 news "<query>" [options]
Same options as search. News services: google, bing, duckduckgo, yahoo, hackernews. Default service: bing.
When user asks for breaking/latest news, always add -t day.
s1 crawl <url>
Extracts clean content from a URL. Use this whenever the user shares a link.
s1 sitemap <url>
Returns all discovered links on a URL/domain.
s1 reasoning "<content>"
# or
s1 reason "<content>"
Deep thinking powered by DeepSeek R1. Use for complex analytical questions.
s1 trending <service> [-n <N>]
Services: github, hackernews.
s1 balance
Shows remaining API credits.
s1 search "" -n 15 → get broad resultss1 crawl → crawl the top 3–5 most relevant URLs from resultss1 crawl → get the page contents1 trending github -n 10 → discover hot topicss1 search "" -t day → search for detailss1 crawl → read full article if needed--json to any command for raw JSON (useful for programmatic processing)共 1 个版本