Skip to main content
PerplexitySearch enables an Agent to search the web using the Perplexity Search API and return ranked results with titles, URLs, snippets, and publication dates.

Prerequisites

The following example requires the httpx library and an API key from Perplexity.

Examples

Basic search:
Search with filters (news from the past week, specific domains):

When to Use

Use PerplexitySearch when you need:
  • Current, ranked web search results with publication dates
  • Filtering by recency (past day, week, month, or year)
  • Restriction to specific domains or languages
  • Integration with agents that need up-to-date information

Toolkit Params

Toolkit Functions

Developer Resources