DuckDuckGo Light API
The DuckDuckGo Light API provides a streamlined version of DuckDuckGo Search, delivering organic results, ads, and knowledge graph data with fast response times. It supports locale-based targeting and time-based filtering to narrow down results by recency.
API Parameters
Search Query
-
- Name
-
q - Required
- Required
- Description
-
Parameter defines the query you want to search. You can use any search terms or phrases, such as "best coffee shops" or "machine learning".
Localization
-
- Name
-
locale - Required
- Optional
- Description
-
Specifies the country and language for your search. The default parameter is
us-en. Check the full list of supported DuckDuckGo locales.
Filters
-
- Name
-
time_period - Required
- Optional
- Description
-
Filters results by date. Predefined values are:
-
any_timeDefault past_yearpast_monthpast_weekpast_day
YYYY-MM-DD..YYYY-MM-DD
-
Pagination
-
- Name
-
next_page_token - Required
- Optional
- Description
-
Token for retrieving the next page of results. Located inside
pagination.next_page_tokenin the response.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
duckduckgo_light.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Organic Results
https://www.searchapi.io/api/v1/search?engine=duckduckgo_light&q=Tea
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "duckduckgo_light",
"q": "Tea"
}
response = requests.get(url, params=params)
print(response.text)
{
"organic_results": [
{
"position": 1,
"title": "Tea - Wikipedia",
"link": "https://en.wikipedia.org/wiki/Tea",
"displayed_link": "en.wikipedia.org/wiki/Tea",
"snippet": "Tea is an aromatic beverage prepared by pouring hot or boiling water over cured or fresh leaves of Camellia sinensis, an evergreen shrub native to East Asia which originated in the borderlands of south-western China, north-east India and northern Myanmar. [3][4][5] Tea is also made, but rarely, from the leaves of Camellia taliensis and Camellia formosensis. [6][7][8][9] After plain water, tea ...",
"favicon": "https://external-content.duckduckgo.com/ip3/en.wikipedia.org.ico"
},
{
"position": 2,
"title": "Welcome to Texas Education Agency | Texas Education Agency",
"link": "https://tea.texas.gov/",
"displayed_link": "tea.texas.gov",
"snippet": "The Latest TEA News The latest news from the Texas Education Agency is available through news releases, online correspondence, mailing lists, and other posted information.",
"favicon": "https://external-content.duckduckgo.com/ip3/tea.texas.gov.ico"
},
...
]
}
Ads
https://www.searchapi.io/api/v1/search?engine=duckduckgo_light&q=VPN
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "duckduckgo_light",
"q": "VPN"
}
response = requests.get(url, params=params)
print(response.text)
{
"ads": [
{
"position": 1,
"title": "CyberGhost VPN - Special Offer - Try CyberGhost VPN Risk-free",
"link": "https://www.cyberghostvpn.com/en_US/cgvpn/best?media_source=bing_brand&campaign=&adgroup=&keyword=cyber%20vpn&matchtype=p&extension=&brand=ppc&msclkid=9faa1385e23e1aa005fe7aea5017fb9d",
"tracking_link": "//duckduckgo.com/l/?uddg=https%3A%2F%2Fwww.cyberghostvpn.com%2Fen_US%2Fcgvpn%2Fbest%3Fmedia_source%3Dbing_brand&rut=a1b2c3d4e5f6",
"displayed_link": "cyberghostvpn.com",
"snippet": "Try CyberGhost VPN: Secure Your Data With Zero Risk. 45-Days Money-Back Guarantee. Lightning Fast VPN Connection Speeds. User-Friendly Interface. No Log Policy. 24/7 Support"
},
{
"position": 2,
"title": "Recommended (2026, January) - Up to 88% Off Best VPNs",
"link": "https://us.cybernews.com/lp/best-vpn-us/b/?campaignId=440216610&adgroupId=1319415579102406&adId=&targetId=kwd-82464367998689:loc-4118&device=c&gunique=&msclkid=04356f1f50711cb388bb0670e25827ec",
"tracking_link": "//duckduckgo.com/l/?uddg=https%3A%2F%2Fus.cybernews.com%2Flp%2Fbest-vpn-us&rut=f7g8h9i0j1k2",
"displayed_link": "cybernews.com",
"snippet": "We Made a List of Best VPN Providers for the USA. Compare and Save Time. Never Compromise on Speed or Security. Choose a VPN That Delivers Both."
}
]
}
Knowledge Graph
https://www.searchapi.io/api/v1/search?engine=duckduckgo_light&q=Mcdonalds
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "duckduckgo_light",
"q": "Mcdonalds"
}
response = requests.get(url, params=params)
print(response.text)
{
"knowledge_graph": {
"title": "McDonald's",
"description": "McDonald's Corporation, doing business as McDonald's, is an American multinational fast food restaurant chain. As of 2024, it is the second-largest by number of locations in the world, behind the Chinese chain Mixue Ice Cream & Tea. Brothers Richard and Maurice McDonald founded McDonald's in San Bernardino, California, in 1940 as a hamburger stand. They soon franchised the company. The Golden Arches logo was introduced in 1953.",
"source": {
"name": "Wikipedia",
"link": "https://en.wikipedia.org/wiki/McDonald's"
},
"thumbnail": "https://i.duckduckgo.com/i/4c5f01ddca2f44d8.png"
}
}