qstringobbligatorio
max 500 chars
https://api.sandbase.ai/v1/api/duckduckgo/searchDuckDuckGo organic search results for a keyword, with region and safe-search options.
Il tuo output apparirà qui
Completa gli input, poi fai clic su Esegui.
This API returns DuckDuckGo organic search results for a keyword. Each result has a title, link, snippet and position, and the response also lists related searches. It needs a query in q and accepts an optional region code in kl.
us-en.sitelinks to see which sub-pages DuckDuckGo shows under a main result.related_searches to find follow-up queries for keyword research.curl -X POST "https://api.sandbase.ai/v1/api/duckduckgo/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "apple", "kl": "us-en"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | max 500 chars |
kl | string | No | region code, e.g. us-en |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"organic_results": [
{
"favicon": "https://external-content.duckduckgo.com/ip3/www.apple.com.ico",
"link": "https://www.apple.com/",
"position": 1,
"sitelinks": [
{
"link": "https://www.apple.com/shop/buy-iphone/iphone-18-pro",
"snippet": "Get $35-$885 off a new iPhone 18 Pro or iPhone 18 Pro Max when you trade in an i…",
"title": "Shop Iphone 18 Pro"
}
],
"snippet": "Discover the innovative world of Apple and shop everything iPhone, iPad, Apple W…",
"title": "Apple"
}
],
"related_searches": [
{
"link": "https://duckduckgo.com/?q=apple%20music%20login&origin=related",
"query": "apple music login"
}
],
"search_information": {
"organic_results_state": "Results for exact spelling"
}
}
| Field | Meaning |
|---|---|
organic_results[].title | Title of the search result. |
organic_results[].link | URL of the result page. |
organic_results[].snippet | Short text excerpt shown under the result title. |
organic_results[].position | Rank of the result in the list. The first result has position 1. |
organic_results[].favicon | URL of the site's icon image. |
organic_results[].sitelinks[].title / organic_results[].sitelinks[].link / organic_results[].sitelinks[].snippet | Title, URL and snippet of a sub-page shown under a result. Only some results have sitelinks. |
related_searches[].query | Text of a related search suggestion. |
related_searches[].link | DuckDuckGo URL that runs the related search. |
search_information.organic_results_state | Short note on how the results match the query, for example Results for exact spelling. |
q is required and can be up to 500 characters. kl sets the region and language, for example us-en.$0.015 per successful call. Failed calls are not charged.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
curl -X POST "https://api.sandbase.ai/v1/api/duckduckgo/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "apple",
"kl": "us-en"
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
qstringobbligatoriomax 500 chars
klstringregion code, e.g. us-en
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
Nessuna risposta salvata è stata pubblicata. Esegui l'API in Playground per ispezionarne la risposta.
Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
DuckDuckGo SearchQuesta API DuckDuckGo | $0.015 per chiamata | JSON |
DuckDuckGo | $0.01 per chiamata | JSON |
DuckDuckGo | $0.01 per chiamata | JSON |
DuckDuckGo | $0.00015 per chiamata | JSON asincrono |
DuckDuckGo | $0.015 per chiamata | JSON |
DuckDuckGo | $0.01 per chiamata | JSON |
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/duckduckgo/search con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
$0.015 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Richiesti: q (string). Facoltativi: kl (string). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. DuckDuckGo Search funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API DuckDuckGo.