
Product
PHP and Composer Support Is Now in Beta
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.
@decodo/cli
Advanced tools
Scrape websites, search engines, eCommerce platforms, and social media from your terminal or shell scripts. The Decodo CLI connects you to the Decodo Web Scraping API without building proxy rotation, parsers, or retry logic from scratch.
jq, CI, and coding agentsThe Decodo CLI is a command-line interface for the Decodo Web Scraping API. It wraps every API target as a subcommand and adds shell-native output modes for scripting, automation, and agent workflows.
Instead of maintaining scraping infrastructure, you get a single binary for reliable web data access from the terminal.
Use the CLI when you need web scraping outside an IDE or MCP client:
jq, grep, or custom toolsFor MCP-based scraping inside an IDE, see the Decodo MCP server. The CLI is the right tool when you need direct shell access or scripting.
Web scraping from the terminal, no infrastructure required. Scrape any website, including JavaScript-heavy pages, without handling proxy rotation, CAPTCHA solving, or anti-bot systems.
Structured outputs for automation. Markdown (human-readable), JSON and NDJSON (pipe-friendly), and PNG screenshots — built for scripts, data pipelines, and agent subprocess calls.
Built-in support for popular targets. Tier-1 commands for scrape, search, and screenshot, plus
schema-driven subcommands for Google and Bing, Amazon, Walmart, and Target, Reddit, TikTok, and
YouTube, and more. Run decodo targets to list everything available.
Global proxy infrastructure. 125M+ residential IPs, 195+ geo-locations, and a 99.99% success rate on even the most protected targets — all via the Decodo API.
Pipe-friendly by design. Compact JSON when piped, human-readable output in a TTY, and explicit exit codes for auth, validation, rate limits, and API errors.
Fast time to value. From API token to first scrape in minutes — install with one command or
use npx with zero setup.
Use the Decodo CLI when you need web scraping from the shell, structured data extraction in automation, reliable access to dynamic websites, or an alternative to building scraping infrastructure from scratch. Common scenarios:
jq, databases, or downstream toolsdecodo search or decodo scrape directlydecodo setup
decodo scrape https://ip.decodo.com
decodo search "decodo scraping api"
Requires Node.js 18+
curl -fsSL https://decodo.github.io/cli/install.sh | sh
irm https://decodo.github.io/cli/install.ps1 | iex
npm install -g @decodo/cli
npx @decodo/cli --version
npx @decodo/cli scrape https://ip.decodo.com --token "$DECODO_AUTH_TOKEN"
Get a Basic auth token from the Decodo playground.
# Interactive — saves token to config
decodo setup
# Environment variable — no saved config required
export DECODO_AUTH_TOKEN='your-token'
# Per-command override
decodo whoami --token 'your-token'
Precedence: --token flag → DECODO_AUTH_TOKEN env var → saved config (decodo setup).
decodo whoami # shows token source (flag / env / config)
decodo reset # clear saved config
Once installed and authenticated, try:
decodo scrape https://ip.decodo.com
decodo google-search "top articles hacker news" --page-count 5 --parse
You should see markdown or parsed JSON within seconds. If you see an auth error, double-check your token from the dashboard.
| Command | Description |
|---|---|
decodo scrape <url> | Scrape a URL (markdown by default) |
decodo search <query> | Web search (--engine google|bing, --geo, --limit) |
decodo screenshot <url> | Capture a PNG screenshot (-o file or directory) |
decodo targets | List all scrape targets by group |
decodo setup | Save auth token interactively |
decodo whoami | Show configured auth source |
decodo reset | Remove saved auth config |
Every API target is also available as its own subcommand (kebab-case name from decodo targets):
decodo google-search "decodo scraping api"
decodo universal https://ip.decodo.com
decodo universal --help
Use decodo <target> --help for target-specific flags (--parse, --geo, and others from the schema).
By default, scrape commands print the first result's content (parsed JSON when the target supports --parse, markdown for decodo scrape).
| Flag | Effect |
|---|---|
--full | Print the full API response envelope |
--format ndjson | One JSON object per result line on stdout (pipe-friendly) |
--pretty | Indented JSON on stdout |
-o, --output <path> | Write to a file instead of stdout |
-v, --verbose | Print debug logs to stderr |
TTY vs pipe: When stdout is a terminal, human-readable output is used where possible. When piped or redirected, raw bytes or compact JSON is written. Screenshot output must go to -o or a redirect — writing binary PNG to a TTY is rejected.
NDJSON line contract: With --format ndjson, stdout is one JSON object per API result line. Without --full, each line is that result's content. With --full, each line is the full result entry (e.g. content, status_code, url). There is no envelope-level .results[] on a single line — pipe each line through jq individually.
# Parsed JSON from Google Search
decodo google-search "query" --parse
# Full envelope, pretty-printed
decodo google-search "query" --full --pretty
# NDJSON stream for jq / agents
decodo google-search "query" --format ndjson --full | jq -c '.url'
# Search and extract titles
decodo google-search "rust web scraping" --page-count 3 --parse | jq '.results.results.organic[].title'
# Scrape JSON API endpoint
decodo scrape https://ip.decodo.com/json | jq '.proxy.ip'
# Screenshot to file, then open
decodo screenshot https://example.com -o shot.png
# Request from a specific country
decodo scrape https://example.com --country us
decodo search "shoes" --geo de
decodo google-search "shoes" --geo de --parse
Use decodo <target> --help for all geo, locale, and target-specific options from the API schema.
Coding agents (Cursor, Claude Code, Codex, Gemini CLI, Windsurf) should invoke the CLI as a shell subprocess, not embed scraping logic.
Recommended patterns:
# Zero-install (good for CI and ephemeral agents)
npx --yes @decodo/cli search "topic" --token "$DECODO_AUTH_TOKEN"
# Global install (faster repeat calls)
decodo search "topic"
decodo scrape https://example.com --full --format ndjson
Guidelines for agents:
DECODO_AUTH_TOKEN or run decodo setup before scraping.--format ndjson --full when parsing multiple results programmatically.decodo targets to discover available target commands.decodo <target> --help for schema-accurate flags.| Variable | Description |
|---|---|
DECODO_AUTH_TOKEN | Basic auth token (overrides saved config, below --token) |
DECODO_CONFIG_HOME | Override config directory (default: $XDG_CONFIG_HOME/decodo, else ~/.config/decodo) |
| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Usage error (invalid flags, missing args) |
3 | Authentication error (missing or invalid token) |
4 | Validation error (invalid request parameters) |
5 | Rate limit |
6 | Timeout |
7 | API / network error |
No auth token found
Run decodo setup or export DECODO_AUTH_TOKEN.
command not found: decodo
The install script auto-configures PATH and prints a source step — re-run it or open a new terminal. You can also use npx @decodo/cli.
Validation / API errors
Read the Error: message on stderr. Use --full to inspect the raw API response.
Screenshot TTY error
Use -o shot.png or redirect: decodo screenshot <url> > shot.png.
corepack enable if needed)git clone https://github.com/Decodo/cli
cd cli
pnpm install
pnpm build
node build/esm/index.js --help
pnpm link --global && decodo --help
pnpm lint
pnpm typecheck
pnpm test
Web Scraping API, Decodo MCP server, Decodo OpenClaw skill
Install the CLI and start scraping from your terminal in minutes.
Start for free | Docs | Discord
All code is released under the MIT License.
FAQs
Official CLI for the Decodo APIs
The npm package @decodo/cli receives a total of 29 weekly downloads. As such, @decodo/cli popularity was classified as not popular.
We found that @decodo/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.