
HasData DuckDuckGo
com.hasdata由 hasdata.com 發布官方發布者v1.0.7更新於 Oct 24, 2026
DuckDuckGo search as JSON. Ranked results, ads in their own array, 37 regions.
發布方自己的服務:HasData Airbnb
概覽
託管的 DuckDuckGo 搜尋 MCP 伺服器,以結構化 JSON 回傳排序後的自然結果、獨立的廣告陣列與 DuckDuckGo 的 AI 回答,支援 37 個地區。
- 可以做什麼
- 執行 DuckDuckGo 搜尋,回傳解析後的自然結果,含位置、標題、連結、顯示連結、來源、摘要、日期與站內連結
- 從獨立的廣告陣列讀取付費版位,並讀取 DuckDuckGo 自帶的 Search Assist AI 回答
- 以 kl 地區代碼指定地區,或用 cc 與 setLang 分別設定國家與語言,並可逐次設定 safeSearch 與 deviceType
- 使用每次回應回傳的游標翻頁
- 以資源形式讀取地區、語言、safeSearch 與 deviceType 的固定取值清單,不消耗額度
- 適用情境
- 適合需要即時網頁搜尋結果且要求穩定可解析結構的情境,例如排名追蹤、同一查詢跨多個地區比較,或把廣告與自然結果分開。若每天只在單一助理中做少量搜尋,自託管的免費伺服器也是合理選擇。
- 執行需求
- 需要 HasData API 金鑰:遠端端點透過 x-api-key 標頭傳遞,npm 或 PyPI 的 stdio 啟動器則從 HASDATA_API_KEY 環境變數讀取。需要支援自訂標頭的 streamable HTTP 用戶端,或 Node.js、uv 來執行啟動器,並能連線到託管端點。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 HasData DuckDuckGo,將其新增到工作區。
- 連接 x-api-key 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/com.hasdata%2Fduckduckgo/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"hasdata-duckduckgo": {
"type": "http",
"url": "https://mcp.hasdata.com/mcp?apis=duckduckgo",
"headers": {
"x-api-key": "<YOUR_API_KEY>"
}
}
}
}README
DuckDuckGo MCP Server
A hosted DuckDuckGo MCP server that gives Claude, Cursor, Windsurf and any other MCP client DuckDuckGo search results as structured JSON. Ranked organic results with positions, ads in their own array, DuckDuckGo's own AI answer, and 37 regions to target. Built for volume and for parsing, with no local browser and no fallback chain to configure.
1,000 free credits every month, no card required, which is 100 searches.
[Glama score] [tool contract] [MCP] [Regions]
Contents
- What you need
- Quick start
- Example prompts
- Tools
- Errors and failure paths
- Pricing, free tier and limits
- Tool selection
- How it compares
- FAQ
- HasData links
- Development
- Contributing
- License
What you need
An MCP client that speaks streamable HTTP with custom headers. A HasData API key from the dashboard, free to create. Nothing else. This is a remote server, so the simplest path is a URL and a header, with no browser package to add and no local process to keep up. A stdio-only client can use the @hasdata/duckduckgo-mcp (npm) or hasdata-duckduckgo-mcp (PyPI) launcher instead.
Quick start
The server URL is the same for every client. We run it hands-on in Claude Code and Claude Desktop. The other blocks follow each client's own documented format for a remote server.
Clients with OAuth support can add the same URL as a connector and sign in without putting a key in a config file.
Claude Code
Claude Desktop
Settings, then Connectors, then Add custom connector, then paste https://mcp.hasdata.com/mcp?apis=duckduckgo and sign in.
For the config-file route, Claude Desktop loads only local (stdio) servers, so it reaches a remote server through a stdio launcher. The @hasdata/duckduckgo-mcp package is that launcher, and it reads the key from the environment. Add this to claude_desktop_config.json:
Python instead of Node? Swap the launcher for the PyPI package, which uvx runs without a manual install:
Cursor
~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
Windsurf
~/.codeium/windsurf/mcp_config.json. Windsurf calls the field serverUrl, not url:
Cline
VS Code
.vscode/mcp.json in the workspace:
Codex CLI
~/.codex/config.toml:
Gemini CLI
~/.gemini/settings.json:
Example prompts
Prompts, not code. Paste one in and the agent calls the tool itself. Each is annotated with the calls it takes, because in MCP the model decides how many calls to make and every successful call costs 10 credits.
Search DuckDuckGo for "model context protocol" and give me the top ten results with their positions and domains.
One call, 10 credits.
Run the query "vpn review" in the German region and again in the US region, then tell me which domains appear in one and not the other.
Two calls, 20 credits. Region is a parameter. The same query in two markets is two calls.
Search for "best crm software" and list only the paid placements, with the advertiser domain for each.
One call, 10 credits. Ads arrive in their own array and need no filtering heuristics.
Take the query "model context protocol" and walk the first three pages, then tell me which domains hold more than one position.
Three calls, 30 credits. Each page after the first is a fresh call with the cursor, and drop q from the arguments once you have one.
Search "who invented the transistor" and show me DuckDuckGo's own AI answer next to the organic results it drew on.
One call, 10 credits.
Two of those are the reason this server exists. Region targeting is a first-class parameter across 37 markets. Comparing one query across countries is a loop and not a proxy setup. And paid placements come back separately from organic, which keeps rank tracking from depending on guessing which result was an ad.
Paging costs a call each time. A prompt that walks ten pages is ten calls and 100 credits.
Tools
One tool. Samples below are trimmed from real calls, and the results in them change as the web changes. Read them as shapes.
The samples are the payload, not the whole response. A tools/call result carries one text block, and that text is itself JSON holding url, status, text and json, with the scraped data under json. From a raw JSON-RPC response the path is result.content[0].text, parsed, then .json. A chat client unwraps that for you and code talking to the endpoint directly does not.
Get DuckDuckGo search results
hasdata_duckduckgo_serp_getSearchResults
Fetches a DuckDuckGo results page and returns it parsed.
Send either
qornextPageToken. Sending neither returns 422 naming both fields, because the requirement is conditional and the schema cannot express it as a plain required list. Sending both is not an error either, the cursor wins and the query goes nowhere, so an agent that keepsqin the arguments while paging silently reads the wrong result set.
positioncounts inside the page it came from, not across the whole result set. Page two comes back with positions starting at 1 again, and page size is not fixed either, so pages of 10, 15 and 14 results all turn up. Absolute rank is therefore the number of organic results you have already collected plusposition, not anything you can derive from the page number. Build a rank dataset without that and every page contributes its own number one.
Returns organicResults, ads, searchAssist and pagination. Organic entries carry position, title, link, displayedLink, source and snippet, plus a date, sitelinks and video metadata where DuckDuckGo shows them. searchAssist holds DuckDuckGo's own AI answer for the query.
adsandsearchAssistare absent when the page has neither, so test for the key before reading it.organicResultscan be absent too, so read it with a default rather than treating its presence as given. A query with no real matches still comes back as a full page of loosely related entries, which is not how "nothing found" usually looks.
Prompts and resources
The server exposes 5 resources, one per parameter whose accepted values are a fixed list. Reading one is cheaper than learning the vocabulary from a rejected call, and it costs no credits. Each URI is hasdata://duckduckgo/<parameter>.
The list is served without an API key, so a client can read it before a user has signed up.
Errors and failure paths
Your client almost never sees an HTTP error code from a tool call. The MCP layer answers 200 and puts the failure inside the result, with isError set to true and the reason as text. The agent reads a message where you might expect a status line.
A wrong key surfaces as tool output, not as a failed connection. Listing tools accepts any non-empty key, so the client completes its handshake and shows green. The first tool call then comes back with isError: true and the text HasData API error: 401 Unauthorized. Watch for that string, because nothing earlier in the flow reports the problem.
A missing key is the one real HTTP error. Authorization runs before any tool, and the connection itself fails with 401.
An argument that breaks the schema is rejected before it becomes a search. The server answers with isError: true and the text MCP error -32602: Input validation error, naming the field. Nothing is fetched and nothing is charged.
Neither q nor nextPageToken returns 422 with an errors array naming both fields and the requiredIfNotExists rule that ties them together.
A query with nothing behind it still returns results. DuckDuckGo decides relevance, so a nonsense string comes back as a normal page of ten loosely related entries with ads and searchAssist absent. Nothing marks it as a miss, which matters if you are building an alert on "no coverage for this brand".
Results that carry data also carry a requestMetadata.id worth quoting in support.
Pricing, free tier and limits
Every call costs 10 credits. The number of results does not change the price. A full page costs the same as a page with one entry.
The free tier is 1,000 credits every month with no card, which is 100 searches. It renews with the billing cycle, so a low-volume agent runs on the free tier indefinitely.
Paid plans start at $59 a month for 200,000 credits, which is 20,000 searches. The unit price falls with volume, from $2.95 per 1,000 searches on the entry plan to $1.19 on Basic and $0.83 across the Growth tiers. Current numbers live on the pricing page.
Your plan also sets concurrency. The free tier allows 5 requests at a time, Startup 5, Basic 15, and the Growth tiers run from 50 to 500. Handle the overflow case defensively in anything unattended, because an agent that fans out will reach the ceiling before you do.
A request that comes back non-200 is not billed. A successful call that finds nothing is still a call.
Tool selection
The apis query parameter decides which tools your agent sees. Fewer tools means less context spent on tool definitions, and fewer chances for the model to reach for the wrong one.
The parameter takes provider names like duckduckgo and individual API names like google_maps_search. Misspelled names are ignored. If every name is wrong the request fails with 400, and the body lists both what it did not recognise and every valid value. Drop the parameter and the same endpoint exposes all 57 HasData tools.
Three engines in one agent is the common reason to widen the list here, because comparing the same query across DuckDuckGo, Google and Bing is a single prompt once all three are exposed.
How it compares
The realistic alternative is a self-hosted server. The popular ones are Python packages you run locally, they reach DuckDuckGo from your own machine, and they hand the model a formatted text block. That works well for a research assistant answering one question at a time. It stops working when you want volume and a stable shape.
Two rows carry most of the decision. A text blob is the right output for a chat answer and the wrong one for a rank dataset, because reconstructing position out of prose is work you should not be doing. And the fetching being ours means the backend question goes away, along with picking between httpx and a browser-impersonating client, installing the extra that the fallback depends on, and reading a stack trace when a plain HTTP client stops getting a page back.
Everything else on that list is a real trade. A self-hosted server is free, needs no account, keeps your queries on your own machine, and fetches page content, which this server does not do. If you run a handful of searches a day inside one assistant, it is the better fit. This one is for the case where the number of searches, the number of regions, or the shape of the output starts to matter.
Against DuckDuckGo's own API. api.duckduckgo.com is the Instant Answer API, and it returns an encyclopedia abstract when one exists rather than a results page. There is no official endpoint that hands you ranked web results, which is why every option here parses the page.
What this server does not do. No page fetching or content extraction, no image or news verticals, no autocomplete. It returns the results page, parsed.
FAQ
Is there an official DuckDuckGo MCP server?
No. DuckDuckGo publishes no MCP server. Every option is built by somebody else. Most are open-source projects that run locally, and this one is a hosted server maintained by HasData.
What is a DuckDuckGo MCP server?
A server that exposes DuckDuckGo search as a tool an AI client can call. The client sends a tool call over the Model Context Protocol, the server runs the search and returns structured JSON, and the model works with the result and never sees a page of HTML.
Do I need a DuckDuckGo account or API key?
No. The only credential is your HasData key. DuckDuckGo has no developer programme to sign up for, and the Instant Answer API it does publish returns no search results.
Do I need to host or run anything?
No. This is a remote MCP server on streamable HTTP. Nothing to install, no Python environment, no browser package, no process to restart.
Is the data live or cached?
Live. Each call fetches the results page at request time and carries its own requestMetadata.id. Two identical calls are two separate fetches and not a replay of a stored copy.
Can I compare the same query across regions?
Yes, and that is the main reason to use a parameter instead of a proxy. kl takes 37 region codes, and cc with setLang splits country and language when you need them apart. Each region is its own call.
What happens when DuckDuckGo changes its layout?
Nothing on your side. We track the changes and keep the response schema stable, so field names and types stay put. A block with nothing to report is absent from the response, so read ads and searchAssist with a default.
Can I use this together with other HasData APIs?
Yes. The apis parameter takes a list, and ?apis=duckduckgo,google_serp,bing_serp gives your agent three search engines at once.
Can I sign in with OAuth instead of pasting a key?
Yes, in clients that support it. Claude Desktop and Cursor can add the endpoint as a connector and sign in. Unattended agents and scripts use the x-api-key header.
Compliance and personal data
HasData accesses publicly available data only. A platform's terms may restrict automated access, and you are responsible for your own compliance. Where the data you collect includes personal information, make sure you have a lawful basis for it under GDPR, CCPA or the equivalent rules in your jurisdiction.
HasData links
Development
This repository is configuration and documentation for a remote server. There is no build step and nothing to containerize.
The tests in test/ assert the tool contract, the part that can break without a commit here. They check that ?apis=duckduckgo returns exactly one tool, that its name has not changed, that the parameters this README documents still exist with the enums it quotes, and that the key in use is actually accepted. That last check runs a real search and costs 10 credits, which is the price of a canary that can fail for the right reason.
The same suite runs in CI on every push and once a week on a schedule, because the upstream tool list can change without anyone touching this repository. A failure means the tool list moved, the key stopped working, or the endpoint was unreachable, and the assertion message says which.
Contributing
Corrections to the parameter table and the response sample are the most useful contribution, because those are the parts that drift. Include the call you made and the response you got. Pull requests from forks run the suite without a key, and the live checks skip instead of going red.
License
MIT. See LICENSE.
來源:README.md,提交 294437f
工具
0版本歷史
3- v1.0.7最新Sep 24, 2026
- v1.0.6Sep 22, 2026
- v1.0.5Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具必需15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Hasdata 整合

HasData Airbnb
com.hasdata官方發布者
由 HasData 託管的 Airbnb MCP 伺服器,提供兩個唯讀工具,讓助理依地點或地圖區域搜尋房源,並以 JSON 讀取房源詳情。

HasData Google Flights Deals
com.hasdata官方發布者
HasData 託管伺服器,提供一個 Google Flights Deals 工具,把自然語言描述的旅行想法變成帶日期的票價、航空公司、轉機次數與訂票連結。

HasData ChatGPT
com.hasdata官方發布者
HasData 託管伺服器,讓助理匿名向 ChatGPT 提問,並取回 Markdown 答案及其引用的網頁來源。

HasData Google Hotels
com.hasdata官方發布者
HasData 託管伺服器,提供一個 Google Hotels 工具,讓助理搜尋飯店與度假短租,並查看某房源在各訂房網站的價格。

HasData Zillow
com.hasdata官方發布者
由 HasData 提供的託管服務,讓助理以結構化 JSON 搜尋 Zillow 待售、出租與已售物件,並讀取完整物件詳情。