search1api-cli
v1.1.2
Published
CLI tool for Search1API - web search, news, crawl, sitemap, reasoning and trending
Downloads
416
Maintainers
Readme
search1api-cli
Command-line interface for Search1API — web search, news, crawl, sitemap, reasoning, and trending from your terminal.
Installation
npm install -g search1api-cliThis installs two commands: search1api and s1 (shorthand).
Setup
Set your API key (get one at search1api.com):
s1 config set-key <your-api-key>Or use an environment variable:
export SEARCH1API_KEY=<your-api-key>Commands
search
Search the web across 13 search engines.
s1 search "Claude AI"
s1 search "rust async" -n 5 -s google
s1 search "machine learning" --include arxiv.org github.com
s1 search "breaking news" -t day
s1 search "web framework" -c 3 # crawl top 3 results for full content| Option | Description | Default |
|--------|-------------|---------|
| -n, --max-results <number> | Number of results (1-50) | 10 |
| -s, --service <service> | Search engine | google |
| -c, --crawl <number> | Crawl N results for full content | 0 |
| --include <sites...> | Only include these sites | |
| --exclude <sites...> | Exclude these sites | |
| -t, --time <range> | Time range: day, month, year | |
| --json | Output raw JSON | |
Available search services: google, bing, duckduckgo, yahoo, x, reddit, github, youtube, arxiv, wechat, bilibili, imdb, wikipedia
news
Search for news articles.
s1 news "AI regulation"
s1 news "tech layoffs" -s hackernews -t day| Option | Description | Default |
|--------|-------------|---------|
| -n, --max-results <number> | Number of results (1-50) | 10 |
| -s, --service <service> | News service | bing |
| -c, --crawl <number> | Crawl N results for full content | 0 |
| --include <sites...> | Only include these sites | |
| --exclude <sites...> | Exclude these sites | |
| -t, --time <range> | Time range: day, month, year | |
| --json | Output raw JSON | |
Available news services: google, bing, duckduckgo, yahoo, hackernews
crawl
Extract content from a URL.
s1 crawl https://example.com/articlesitemap
Get related links from a website.
s1 sitemap https://example.comreasoning
Deep thinking and reasoning powered by DeepSeek R1.
s1 reasoning "Explain the fundamentals of quantum computing"
s1 reason "Compare REST vs GraphQL" # 'reason' is a shorthand aliastrending
Get trending topics from popular platforms.
s1 trending github
s1 trending hackernews -n 20Available services: github, hackernews
balance
Check your remaining API credits.
s1 balanceconfig
Manage CLI configuration.
s1 config set-key <key> # Save API key
s1 config show # Show current configClaude Code Skill
This repo also includes a Claude Code skill that lets Claude automatically use s1 commands when you ask it to search the web, read URLs, check news, etc.
Install the skill:
npx skills add fatwang2/search1api-cliOnce installed, you can ask Claude things like:
- "search for the latest AI news"
- "what does this link say? https://example.com"
- "what's trending on GitHub?"
- "research quantum computing thoroughly"
Claude will automatically use the appropriate s1 command and summarize the results.
JSON Output
All commands support --json flag to output raw JSON, useful for piping and scripting:
s1 search "test" --json | jq '.results[0].title'
s1 balance --jsonLicense
MIT
