DuckDuckGo

Search DuckDuckGo

Search DuckDuckGo's web results by keyword, region and time, with sponsored results apart and cursor paging.

GET/v1/duckduckgo/search
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
5
querystringrequiredquery

What to search for, e.g. `marathon training plan`. Search operators such as `site:` work.

min 1 chars · max 500 chars

timestringoptionalquery

Only results from the past `day`, `week`, `month` or `year`. Default: any time.

one of: day, week, month, year

cursorstringoptionalquery

Pass `page.nextCursor` from the previous response to get the next page.

min 1 chars · max 4096 chars

countrystringoptionalquery

Two-letter country code of the results' region, e.g. `GB` or `DE`. Default: `US`.

pattern: ^[A-Z]{2}$

languagestringoptionalquery

Two-letter language code for a country with several, e.g. `fr` with `CH`. Default: the region's first language.

pattern: ^[a-z]{2}$

Response fields
25

Endpoint-specific response payload.

datalookupStatus
string

Always `found`: no match is an empty list.

one of: found, not_found

dataquery
string

The query that was searched.

dataregion
string

DuckDuckGo's region code the results are for, e.g. `us-en`.

datapageNumber
integer

This page's number, from 1.

Web results.

dataresults[]position
integer

Rank in the results, from 1.

dataresults[]title
string

Result title.

dataresults[]url
string

The page the result links to.

dataresults[]displayUrl
stringnullable

The address as DuckDuckGo shows it.

dataresults[]snippet
stringnullable

Text under the title.

Sponsored results shown with this page.

dataads[]title
string

Ad title.

dataads[]domain
stringnullable

The advertiser's domain.

dataads[]displayUrl
stringnullable

The address the ad shows.

dataads[]snippet
stringnullable

Ad text.

Pagination state for the current page.

datapagehasMore
boolean

Whether another page is available.

datapagenextCursor
stringnullable

Cursor to pass in the next request when more pages exist; null on the last page.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metastale
booleanoptional

Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.

one of: true

metafetchedAt
stringoptional

When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.

Code example

curl "https://api.socialfetch.dev/v1/duckduckgo/search?query=marathon%20training%20plan" \
  -H "x-api-key: YOUR_API_KEY"

Responses

A page of DuckDuckGo web results and sponsored results.