Action that performs web search using DuckDuckGo's Instant Answer API Returns search results with titles, URLs, and snippets

Example

// Basic web search
await runAction({
ActionName: 'Web Search',
Params: [{
Name: 'SearchTerms',
Value: 'TypeScript programming'
}]
});

// Search with custom result count
await runAction({
ActionName: 'Web Search',
Params: [{
Name: 'SearchTerms',
Value: 'machine learning tutorials'
}, {
Name: 'MaxResults',
Value: 15
}]
});

Hierarchy (view full)

Constructors

Methods

  • Executes the web search using DuckDuckGo's API

    Parameters

    • params: RunActionParams<any>

      The action parameters containing:

      • SearchTerms: Keywords to search for (required)
      • MaxResults: Maximum number of results to return (default: 10, max: 30)
      • Region: Regional search preference (default: 'us-en')
      • SafeSearch: Safe search level - 'strict', 'moderate', 'off' (default: 'moderate')
      • DisableQueueing: If true, fails immediately when rate limited instead of queueing (default: false)

    Returns Promise<ActionResultSimple>

    Web search results with titles, URLs, and snippets

  • Executes the action with the provided parameters.

    Parameters

    • params: RunActionParams<any>

      The action execution parameters including context

    Returns Promise<ActionResultSimple>

    Promise resolving to the action result