Crate duckduckgo

Source
Expand description

ยง๐Ÿฆ† DuckDuckGo

Crates.io docs License

โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•
โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•
โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•  โ•šโ•โ•โ•โ•โ•โ•

Search and advanced search in DuckDuckGo
========================================

ยง๐Ÿ“– Table of Contents

ยง๐Ÿš€ Installation

To install duckduckgo cli, use the following Cargo command:

cargo install --locked duckduckgo --all-features

ยงโœจ Features

  • ๐Ÿ” Simple and advanced search: Perform DuckDuckGo searches using basic queries or advanced search operators.
  • โš™๏ธ Search operators: Refine results using DuckDuckGo-compatible filters (e.g. site, filetype, intitle).
  • ๐Ÿ›ก๏ธ Safe search toggle: Enable or disable family-friendly search filtering.
  • ๐Ÿ–จ๏ธ Output formatting: Choose between list or detailed formats for displaying results.
  • ๐Ÿงฎ Result limiting: Limit the number of results returned (default is 10).
  • ๐Ÿงญ Backend selection: Use --backend to choose the search backend (Auto, HTML, or API).
  • ๐ŸŒ Custom user agent: Spoof or specify a user agent string for requests.
  • ๐Ÿงฉ Cookie control: Enable or disable cookie handling for requests.
  • ๐Ÿ•ต๏ธ Proxy support: Route requests through a custom HTTP or SOCKS proxy.
  • ๐Ÿ› Verbose mode: Print debug information for troubleshooting.
  • ๐ŸŽจ ANSI-colored output: Enjoy beautiful, readable output right in your terminal.

ยง๐Ÿš— Usage

Learn how to use the duckduckgo and explore its features with the following examples:

ddg --query "rust lang"

ยงUse search operators:

ddg --query "rust lang" --operators "+tutorial"
ddg --query "rust lang" --safe

ยงSet the output format to detailed:

ddg --query "rust lang" --format

ยงLimit the number of results to 3:

ddg --query "rust lang" --limit 3

ยงSet user agent:

ddg --query "rust lang" --user-agent "chrome"

ยงSet Different Backends:

# news
ddg --query "rust lang" --backend news

# images
ddg --query "rust lang" --backend images

# lite
ddg --query "rust lang" --backend lite
Available Browsers/Agents
Browser/Agent
abrowse
acoo browser
america online browser
amigavoyager
aol
arora
avant browser
beonex
bonecho
browzar
camino
charon
cheshire
chimera
chrome
chromeplus
classilla
cometbird
comodo_dragon
conkeror
crazy browser
cyberdog
deepnet explorer
deskbrowse
dillo
dooble
edge
element browser
elinks
enigma browser
enigmafox
epiphany
escape
firebird
firefox
fireweb navigator
flock
fluid
galaxy
galeon
granparadiso
greenbrowser
hana
hotjava
ibm webexplorer
ibrowse
icab
iceape
icecat
iceweasel
inet browser
internet explorer
irider
iron
k-meleon
k-ninja
kapiko
kazehakase
kindle browser
kkman
kmlite
konqueror
leechcraft
links
lobo
lolifox
lorentz
lunascape
lynx
madfox
maxthon
midori
minefield
mozilla
myibrow
myie2
namoroka
navscape
ncsa_mosaic
netnewswire
netpositive
netscape
netsurf
omniweb
opera
orca
oregano
osb-browser
palemoon
phoenix
pogo
prism
qtweb internet browser
rekonq
retawq
rockmelt
safari
seamonkey
shiira
shiretoko
sleipnir
slimbrowser
stainless
sundance
sunrise
surf
sylera
tencent traveler
tenfourfox
theworld browser
uzbl
vimprobable
vonkeror
w3m
weltweitimnetzbrowser
worldwideweb
wyzo
ddg --query "rust lang" --cookie

ยงSet proxy:

ddg --query "rust lang" --proxy "socks5://192.168.1.1:9000"

ยง๐ŸŽจ Options

OptionDefault ValueDescription
--query, -q(required)Set the search query.
--operators, -o""Set search operators (e.g., +site:rust-lang.org).
--safe, -sfalseEnable safe search (family-friendly results).
--format, -ffalseOutput format: false = list, true = detailed.
--limit, -l10Limit the number of search results.
--user-agent, -ufirefoxSet a custom user agent for HTTP requests.
--cookie, -ctrueEnable cookie handling for the HTTP client.
--proxy, -p""Set a proxy for requests (e.g., socks5://192.168.1.1:9000).
--backend, -bAutoChoose backend: Auto, HTML, or API.
--verbose, -vfalseEnable verbose (debug) mode.

ยง๐Ÿค Contributing

Contributions and feedback are welcome! If youโ€™d like to contribute, report an issue, or suggest an enhancement, please engage with the project on GitHub. Your contributions help improve this CLI for the community.

ยง๐Ÿ“„ License

This project is licensed under the MIT License.

Modulesยง

browser
colors
icon
response
topic
user_agents