> ## Content Index
> Fetch the complete content index at: https://serpapi.com/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# DuckDuckGo Search API for SerpApi
- URL: https://serpapi.com/blog/duckduckgo-search-api-for-serpapi/
- Published: 2021-10-08T23:40:29.000Z
- Updated: 2023-05-01T19:52:34.000Z
- Author: Justin O'Hara
- Tags: DuckDuckGo

For those who don’t use Chrome, Firefox or even Internet Explorer for their browser may have opted to search with DuckDuckGo.

Since SerpApi’s goal is to scrape Google and other search engines, we found it to be in our wheelhouse to scrape these privatized search results from DuckDuckGo that differ from that of Google’s search engine.

Taken from DuckDuckGo’s Wikipedia:

> DuckDuckGo is an internet [search engine](https://en.wikipedia.org/wiki/Search%5Fengine) that emphasizes protecting searchers' [privacy](https://en.wikipedia.org/wiki/Internet%5Fprivacy) and avoiding the [filter bubble](https://en.wikipedia.org/wiki/Filter%5Fbubble) of [personalized search](https://en.wikipedia.org/wiki/Personalized%5Fsearch) results.DuckDuckGo does not show search results from [content farms](https://en.wikipedia.org/wiki/Content%5Ffarm).[\[5\]](https://en.wikipedia.org/wiki/DuckDuckGo#cite%5Fnote-5) It uses various [APIs](https://en.wikipedia.org/wiki/API) of other websites to show quick results to queries and for traditional links it uses the help of its partners (mainly Bing) and its own [crawler](https://en.wikipedia.org/wiki/Web%5Fcrawler)

[SerpApi Playground - SerpApiTest SerpApi’s Google Search, Google Maps, YouTube, Bing, Walmart, Ebay, Baidu, Yandex and more APIs for free in the interactive playground!![](https://serpapi.com/apple-touch-icon.png)SerpApiSerpApi![](https://serpapi.com/assets/serpapi-text-logo-621a467e3b1e907622c18a6ac81455032e9784d6a86e81a1b4f6407d3f0120a6.svg)](https://serpapi.com/playground?engine=duckduckgo&q=Coffee&kl=us-en)

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2021/10/1-1.png)

When initially looking at the JSON response for the oh-so-typical SerpApi response: “coffee”.

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2021/10/2.png)

I see common datasets compared to the Google Search: like `ads` `organic_results` `inline_images` `inline_images_link` `related_searches` and the normal data that SerpApi provides: `[search_metadata](https://medium.com/serpapi/serpapis-returned-search-metadata-field-and-to-make-sense-of-it-all-dbc23be43519)` `search_parameters` `search_information` `serpapi_pagination` .

Here’s a quick snapshot of differences of datasets for “coffee” between the DuckDuckGo Search and Google Search API:

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2021/10/3.png)

One thing that jumps out to me is the amount of `organic_results` that are provided in a default search. There are 27 items provided in DuckDuckGo’s search for coffee.

There is a `serpapi_pagination` link available for the next page of results. And the offset in the link accounts for the 27 previous results:

- “https://serpapi.com/search.json?engine=duckduckgo&kl=us-en&q=Coffee&start=27"

Checking out the list of parameters, they differ a bit from the other engines. The localization parameter `kl` defines the region to use for the DuckDuckGo search. Region code examples: `us-en` for the United States, `uk-en` for United Kingdom, or `fr-fr` for France. Head to the [DuckDuckGo regions](https://serpapi.com/duckduckgo-regions) for a full list of supported regions.

There are also the advanced filters for this search. The safe search `safe` . This parameter defines the level of filtering for adult content. It can be set to `1` (Strict), `-1` (Moderate - default), or `-2` (Off). The `df` parameter defines results filtered by date.

It can be set to:  
`d`: Past day,  
`w`: Past week,  
`m`: Past month,  
`y`: Past year,

Or you can pass a custom date following the next format: `from_date` \+ `..` \+ `to_date` (e.g. `2021-06-15..2021-06-16`).

This API does not have html response, just a text. `search_metadata.prettify_html_file` contains a prettified version of the result. It is displayed in playground.

You can sign-up for SerpApi here: <https://serpapi.com/>

You can find the SerpApi user forum here: <https://forum.serpapi.com/>

You can find the API documentation here: [https://serpapi.com/search-api/](https://serpapi.com/search-api)