Action that performs AI-powered web search using Perplexity's Search API Returns comprehensive search results with citations and related questions

Example

// Basic search with Perplexity
await runAction({
ActionName: 'Perplexity Search',
Params: [{
Name: 'Query',
Value: 'latest developments in quantum computing'
}]
});

// Search with specific model and parameters
await runAction({
ActionName: 'Perplexity Search',
Params: [{
Name: 'Query',
Value: 'climate change research papers 2024'
}, {
Name: 'Model',
Value: 'llama-3.1-sonar-large-128k-online'
}, {
Name: 'ReturnRelatedQuestions',
Value: true
}, {
Name: 'ReturnImages',
Value: true
}]
});

// Search with domain filtering
await runAction({
ActionName: 'Perplexity Search',
Params: [{
Name: 'Query',
Value: 'machine learning tutorials'
}, {
Name: 'SearchDomainFilter',
Value: ['github.com', 'arxiv.org', 'medium.com']
}]
});

Hierarchy (view full)

Constructors

Methods

  • Executes the Perplexity AI search

    Parameters

    • params: RunActionParams<any>

      The action parameters containing:

      • Query: Search query text (required)
      • Model: Perplexity model to use (default: 'llama-3.1-sonar-small-128k-online') Options: llama-3.1-sonar-small-128k-online, llama-3.1-sonar-large-128k-online, llama-3.1-sonar-huge-128k-online
      • MaxTokens: Maximum tokens in response (default: 1000)
      • Temperature: Sampling temperature 0-2 (default: 0.2)
      • TopP: Nucleus sampling threshold (default: 0.9)
      • ReturnImages: Include images in results (default: false)
      • ReturnRelatedQuestions: Include related questions (default: false)
      • SearchDomainFilter: Array of domains to limit/exclude search (use '-' prefix to exclude)
      • SearchRecencyFilter: Filter by recency - 'day', 'week', 'month', 'year' (optional)

    Returns Promise<ActionResultSimple>

    Search results with content, citations, and related questions

  • 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