
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
@agent-infra/duckduckgo-search
Advanced tools
A lightweight TypeScript client for DuckDuckGo Search, designed for AI applications.
npm install @agent-infra/duckduckgo-search
# or
yarn add @agent-infra/duckduckgo-search
# or
pnpm add @agent-infra/duckduckgo-search
import { DuckDuckGoSearchClient } from '@agent-infra/duckduckgo-search';
const client = new DuckDuckGoSearchClient({});
const results = await client.search({
query: 'climate change',
count: 5,
});
console.log(results.results);
import { ConsoleLogger } from '@agent-infra/logger';
import { DuckDuckGoSearchClient } from '@agent-infra/duckduckgo-search';
const logger = new ConsoleLogger('[DuckDuckGoSearch]');
const client = new DuckDuckGoSearchClient({
logger,
});
const results = await client.search({ query: 'machine learning' });
constructor(config?: Partial<DuckDuckGoSearchClientConfig>)
Configuration options:
interface DuckDuckGoSearchClientConfig {
logger?: Logger;
}
async search(params: DuckDuckGoSearchOptions): Promise<DuckDuckGoSearchResponse>
Search options:
interface DuckDuckGoSearchOptions {
query: string; // Search query (required)
count?: number; // Number of results to return
/** The safe search type of the search. */
safeSearch?: SafeSearchType;
/** The time range of the searches, can be a SearchTimeType or a date range ("2021-03-16..2021-03-30") */
time?: SearchTimeType | string;
/** The locale(?) of the search. Defaults to "en-us". */
locale?: string;
/** The region of the search. Defaults to "wt-wt" or all regions. */
region?: string;
/** The market region(?) of the search. Defaults to "US". */
marketRegion?: string;
/** The number to offset the results to. */
offset?: number;
/**
* The string that acts like a key to a search.
* Set this if you made a search with the same query.
*/
vqd?: string;
[key: string]: any; // Additional parameters
}
interface DuckDuckGoSearchResponse {
/** Whether there were no results found. */
noResults: boolean;
/** The VQD of the search query. */
vqd: string;
/** The web results of the search. */
results: SearchResult[];
// Additional response fields
}
See examples.
Copyright (c) 2025 ByteDance, Inc. and its affiliates.
Licensed under the Apache License, Version 2.0.
FAQs
<a href="https://npmc
We found that @agent-infra/duckduckgo-search demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.