CLI
Search the web, read pages and check trends from your terminal with the Search1API CLI.
s1 puts the whole API in your terminal — and, because it prints JSON on demand, in your shell scripts too.
Install
curl -fsSL https://cli.search1api.com/install.sh | bashThat installs a standalone binary; no Node.js required. If you would rather use npm:
npm install -g search1api-cliLog in
s1 loginThis opens a browser, and saves the key for you. On a headless box, use s1 login --no-browser, or set the key directly:
s1 config set-key YOUR_API_KEY
# or
export SEARCH1API_KEY=YOUR_API_KEYs1 config show prints what it is currently using.
Commands
| Command | What it does |
|---|---|
s1 search "<query>" | Search the web |
s1 news "<query>" | Search the news |
s1 crawl <url> | Read a page |
s1 sitemap <url> | List a site's links |
s1 trending <github|hackernews> | Trending topics |
s1 balance | Remaining credits |
s1 login | Authorize in the browser |
s1 config set-key | show | Manage configuration |
s1 update | Update s1 in place |
Examples
# Five results from Google
s1 search "rust async" -n 5 -s google
# Search, then crawl the top 3 results for their full text
s1 search "web framework" -c 3
# Today's news, from Hacker News
s1 news "tech layoffs" -s hackernews -t day
# Machine-readable output, straight into jq
s1 search "test" --json | jq '.results[0].title'The --json flag is what makes s1 scriptable: pipe it into jq, feed it to a model, commit it to a file.
Flags worth knowing
| Flag | Meaning |
|---|---|
-n, --max-results | 1–50, defaults to 10 |
-s, --service | Pick an engine; omit to race several |
-c, --crawl <N> | Crawl the top N results for full text |
--include / --exclude | Restrict or exclude sites |
-t, --time <day|month|year> | Time range |
--json | Raw JSON instead of formatted output |
-c/--crawl is the same deep-search feature as the API's crawl_results, and bills the same way: 1 credit for the search plus 1 per page successfully crawled. See Credits and limits.
The s1 reasoning command is currently unavailable while the underlying service is rebuilt.