DuckDuckGo News API

Our DuckDuckGo News API allows you to scrape SERP results from DuckDuckGo. The API is accessed through the following endpoint: /search?engine=duckduckgo_news.

A user may query the following: https://serpapi.com/search?engine=duckduckgo_news utilizing a GET request. Head to the playground for a live and interactive demo.

API Parameters

Search Query

q

Required

Parameter defines the query you want to search. You can use anything that you would use in a regular DuckDuckGo News search. (e.g., inurl:, site:, intitle:, etc.)

Localization

kl

Optional

Parameter defines the region to use for the DuckDuckGo News 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 for a full list of supported regions.

Advanced Duckduckgo News Filters

safe

Optional

Parameter defines the level of filtering for adult content. It can be set to 1 (Strict), -1 (Moderate - default), or -2 (Off).

df

Optional

Parameter defines results filtered by date.

It can be set to:
d: Past day,
w: Past week,
m: Past month.

Pagination

start

Optional

Parameter defines the result offset. It skips the given number of results. It's used for pagination. The number of organic_results can vary up to 30.

Serpapi Parameters

engine

Required

Set parameter to duckduckgo_news to use the DuckDuckGo News API engine.

no_cache

Optional

Parameter will force SerpApi to fetch the DuckDuckGo News results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.

API Results

JSON Results

JSON output includes structured data for news results.

A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, error will contain an error message. search_metadata.id is the search ID inside SerpApi.

HTML Results

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

API Examples

Example results for q: apple

Example results for q: apple

JSON Example

{
  "search_metadata": {
    "id": "668d6607914a810e4881ec2e",
    "status": "Success",
    "json_endpoint": "https://serpapi.com/searches/0fea5eac283d7363/668d6607914a810e4881ec2e.json",
    "created_at": "2024-07-09 16:32:07 UTC",
    "processed_at": "2024-07-09 16:32:07 UTC",
    "duckduckgo_news_url": "https://duckduckgo.com/?q=apple&kl=us-en&iar=news&ia=news",
    "raw_html_file": "https://serpapi.com/searches/0fea5eac283d7363/668d6607914a810e4881ec2e.html",
    "prettify_html_file": "https://serpapi.com/searches/0fea5eac283d7363/668d6607914a810e4881ec2e.prettify",
    "total_time_taken": 4.56
  },
  "search_parameters": {
    "engine": "duckduckgo_news",
    "q": "apple",
    "kl": "us-en"
  },
  "search_information": {
    "news_results_state": "Results for exact spelling"
  },
  "news_results": [
    {
      "position": 1,
      "title": "Apple Arcade Adding These New Games in August",
      "link": "https://www.macrumors.com/2024/07/09/apple-arcade-games-in-august-2024/",
      "snippet": "Apple today announced three new games coming to Apple Arcade next month, including award-winning roguelike game Vampire Survivors+ and",
      "source": "MacRumors",
      "date": "2 hours ago",
      "thumbnail": "https://images.macrumors.com/t/u_C_pXSZsKRUDOgjPGv3Z0ZMQ28=/1960x/article-new/2024/07/Temple-Run-Legends.jpg"
    },
    {
      "position": 2,
      "title": "Apple's M1 MacBook Air just hit $649 ahead of Prime Day",
      "link": "https://www.msn.com/en-us/lifestyle/shopping/apples-m1-macbook-air-just-hit-649-ahead-of-prime-day/ar-BB1pFvQb",
      "snippet": "But despite the fact that this model isn't officially in Apple's lineup anymore, it's still available in brand-new condition from several retailers. It also happens to still be one of the best laptops for many people.",
      "source": "BGR on MSN.com",
      "date": "5 hours ago",
      "thumbnail": "https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1l8Cny.img?w=768&h=431&m=4&q=81"
    },
    {
      "position": 3,
      "title": "Nomad's new power adapter doubles as an Apple Watch charger — and we tried it",
      "link": "https://www.cnn.com/cnn-underscored/electronics/nomad-65w-power-adapter-apple-watch-edition",
      "snippet": "Nomad is one of our favorite accessory makers for all things Apple gadgets, whether it be snazzy cases for your iPhone, fresh bands for your Apple Watch or charging stations for all of your devices. The company's latest release falls in the latter category,",
      "source": "CNN",
      "date": "32 minutes ago",
      "thumbnail": "https://media.cnn.com/api/v1/images/stellar/prod/nomad-apple-watch-power-adapter-cnn.jpg?c=16x9&q=h_833,w_1480,c_fill"
    },
    ...
  ],
  "serpapi_pagination": {
    "next": "https://serpapi.com/search.json?engine=duckduckgo_news&kl=us-en&q=apple&start=30"
  }
}