Skip to content

kevin-rs/duckduckgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฆ† 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:

Perform a basic search:

ddg --query "rust lang"

Use search operators:

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

Enable safe search:

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

Set cookie for subsequent requests:

ddg --query "rust lang" --cookie

Set proxy:

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

๐ŸŽจ Options

Option Default Value Description
--query, -q (required) Set the search query.
--operators, -o "" Set search operators (e.g., +site:rust-lang.org).
--safe, -s false Enable safe search (family-friendly results).
--format, -f false Output format: false = list, true = detailed.
--limit, -l 10 Limit the number of search results.
--user-agent, -u firefox Set a custom user agent for HTTP requests.
--cookie, -c true Enable cookie handling for the HTTP client.
--proxy, -p "" Set a proxy for requests (e.g., socks5://192.168.1.1:9000).
--backend, -b Auto Choose backend: Auto, HTML, or API.
--verbose, -v false Enable 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.

About

๐Ÿฆ† A CLI and library for instant DuckDuckGo searches. (WIP)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages