DuckDuckGo rank checker API
Where a domain or URL ranks on DuckDuckGo for a query, up to 200 results deep.
GET /v1/duckduckgo/rankBeta5 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/duckduckgo/rank?query=best%20coffee%20maker&url=nytimes.com",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 5 credits{ "query": "best coffee maker", "target": "nytimes.com", "found": true, "position": 1, "matches": [ { "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…" } ], "depth": 10}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | |
urlquery · required | string | |
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. |
depthquery | integer | |
all_matchesquery | "true" | "false" | One of true, false. |
include_subdomainsquery | "true" | "false" | One of true, false. |
Status codes
| Status | Meaning |
|---|---|
200 | The rank. |
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
Subdomains?
Counted by default; include_subdomains=false to switch off.
DuckDuckGo is a trademark of Duck Duck Go, Inc. We are not affiliated with or endorsed by DuckDuckGo.