Call it
curl https://api.peume.com/v1/call/search-duckduckgo \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"q": "coffee Austin Texas",
"kl": "us-en",
"search_assist": true,
"safe": "-1",
"df": "w",
"start": 0
}
}'const res = await fetch("https://api.peume.com/v1/call/search-duckduckgo", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"q": "coffee Austin Texas",
"kl": "us-en",
"search_assist": true,
"safe": "-1",
"df": "w",
"start": 0
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-duckduckgo",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"q": "coffee Austin Texas",
"kl": "us-en",
"search_assist": True,
"safe": "-1",
"df": "w",
"start": 0
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: search-duckduckgo.
Parameters
qRequiredstringSearch text, 1 to 500 characters.
Example: coffee Austin Texas
klstringDuckDuckGo region and language token, such as us-en; up to 32 characters.
Example: us-en
search_assistbooleanUse DuckDuckGo query assistance. Mutually exclusive with m.
Example: true
safestringSafe-search level: 1 is strict, -1 is moderate, -2 is off.
1 · -1 · -2
Example: -1
dfstringDate filter: d (past day), w (past week), m (past month), y (past year), or a YYYY-MM-DD..YYYY-MM-DD range.
Example: w
startintegerResult offset from 0 through 10,000.
Example: 0
mintegerNumber of results, 1 through 50. Mutually exclusive with search_assist.
Example: 50
timeoutnumberOptional budget for the entire request in seconds, measured from gateway receipt until the response is ready to send. Includes admission, queueing and settlement. Must be greater than 0 and at most 90. On expiry, the call is not billed and returns 503 request_deadline_exceeded with retryable=true and a request ID. Omit to retain the standard server deadline.
Other ways to do it
Same job, other sources, cheapest first.
