DuckDuckGo search API
DuckDuckGo web results for a query, ads left out: position, title, URL, snippet, with region, safe search, time range and paging.
GET /v1/duckduckgo/searchBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/duckduckgo/search?query=best%20coffee%20maker",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "query": "best coffee maker", "results": [ { "position": 1, "title": "The 9 Best Coffee Makers of 2026 | Reviews by Wirecutter", "url": "https://www.nytimes.com/wirecutter/reviews/best-coffee-maker/", "display_url": "www.nytimes.com/wirecutter/reviews/best-coffee-maker/", "snippet": "We think the easiest way to make good coffee is with the OXO Brew 9 Cup Coffee Maker. We also have picks for a budget op…" }, { "position": 2, "title": "Best coffee maker 2026: we tested over 90 machines, and these are the ...", "url": "https://www.tomsguide.com/home/coffee-makers/best-coffee-makers", "display_url": "www.tomsguide.com/home/coffee-makers/best-coffee-makers", "snippet": "From drip coffee to espresso machines, these are the best coffee makers for every home and budget in 2026." }, "… 8 more" ], "next_cursor": "eyJxIjoiYmVzdCBjb2ZmZWUgbWFrZXIiLCJzIjoiMTAiLCJkYyI6IjExIiwidnFkIjoiNC0zMDg5NzA4OTE1NzMxOTU1NDMxNjUzNTA1Nzc4NjczNjI0MTQy…"}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | Example: best coffee maker. |
regionquery | string | DuckDuckGo region (default us-en; wt-wt for none). Example: de-de. |
safe_searchquery | "strict" | "moderate" | "off" | One of strict, moderate, off. |
time_rangequery | "any" | "day" | "week" | "month" | "year" | One of any, day, week, month, year. |
limitquery | integer | |
cursorquery | string |
Status codes
| Status | Meaning |
|---|---|
200 | Web results. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | DuckDuckGo has nothing for that search. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | DuckDuckGo is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Paging?
Pass next_cursor as cursor, or a limit up to 50.
DuckDuckGo is a trademark of Duck Duck Go, Inc. We are not affiliated with or endorsed by DuckDuckGo.