DuckDuckGo Search API
The DuckDuckGo Search API retrieves organic search results from DuckDuckGo with support for region codes, date filters, and pagination via next page tokens.
Endpoint:
https://api.scrapingdog.com/duckduckgo/searchAPI Parameters
π
Scrapingdog Parameters
api_keyRequiredYour personal API key. Available on your dashboard.
Type: StringhtmlOptionalThis will return the full HTML of the Google page.
Default Value -false
Type: String
π
Search Query
queryRequiredThis parameter specifies the search query. You can enter any terms or operators you would normally use in a standard DuckDuckGo search (e.g., inurl:, site:, intitle:, etc.).
Type: String
π
Localization
klOptionalThis parameter sets the region for the DuckDuckGo search. For example: us-en for the United States, uk-en for the United Kingdom, or fr-fr for France. See Supported Regions
Type: String
β
οΈ Advanced DuckDuckGo Filters
dfOptionalThis parameter filters results by date. Options include: d (Past day), w (Past week), m (Past month), y (Past year). You can also specify a custom range using the format: from_date..to_date (e.g., 2021-06-15..2024-06-16).
Type: String
π
Pagination
next_page_tokenOptionalThis parameter specifies the next page token, used to fetch subsequent results. Each page returns 15 results.
Type: String
API Examples
Code to Integrate
curl "https://api.scrapingdog.com/duckduckgo/search?api_key=APIKEY&query=football"
import requests url = "https://api.scrapingdog.com/duckduckgo/search" params = {"api_key": "APIKEY", "query": "football"} response = requests.get(url, params=params) if response.status_code == 200: print(response.json())
const axios = require('axios'); axios.get('https://api.scrapingdog.com/duckduckgo/search', { params: { api_key: 'APIKEY', query: 'football' } }).then(response => console.log(response.data)) .catch(error => console.error(error.message));
<?php $url = 'https://api.scrapingdog.com/duckduckgo/search/?' . http_build_query([ 'api_key' => 'APIKEY', 'query' => 'football', ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); echo curl_exec($ch); curl_close($ch);
require 'net/http' require 'uri' url = URI.parse("https://api.scrapingdog.com/duckduckgo/search/") url.query = URI.encode_www_form('api_key' => 'APIKEY', 'query' => 'football') http = Net::HTTP.new(url.host, url.port) http.use_ssl = true puts http.request(Net::HTTP::Get.new(url)).body
import java.io.*; import java.net.*; public class Main { public static void main(String[] args) throws Exception { String apiUrl = "https://api.scrapingdog.com/duckduckgo/search/?api_key=APIKEY&query=football"; URL url = new URL(apiUrl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; while ((line = reader.readLine()) != null) System.out.println(line); conn.disconnect(); } }
API Response
{
"organic_results": [
{
"title": "Order NFL Football Tickets - 2025 Full Event Schedule",
"displayed_link": "tickets-center.com",
"link": "https://duckduckgo.com/y.js?...",
"snippet": "2025 Pittsburgh Steelers Tickets & Schedule...",
"rank": 1
},
{
"title": "NFL.com | Official Site of the National Football League",
"displayed_link": "www.nfl.com",
"link": "https://www.nfl.com/",
"snippet": "The official source for NFL news, video highlights.",
"rank": 2
},
{
"title": "NFL on ESPN - Scores, Stats and Highlights",
"displayed_link": "www.espn.com/nfl/",
"link": "https://www.espn.com/nfl/",
"snippet": "Visit ESPN for NFL live scores, video highlights.",
"rank": 3
}
],
"next_page_token": "eyJxIjoiZm9vdGJhbGwiLCJzIjoiMTAifQ=="
}