← Back to Perplexity

Search

Get ranked search results from Perplexity’s continuously refreshed index with advanced filtering and customization options.

Perplexity·$0.01 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "perplexity", path: "/search", body: { "query": "example" } }); console.log(output);

Body parameters

queryrequired
string

A search query. Can be a single query or a list of queries for multi-query search.

max_results
integer

The maximum number of search results to return.

max_tokens
integer

The maximum total number of tokens of webpage content returned across all search results. This sets the overall content budget for the search operation. Higher values return more content in the snippet fields. Use in combination with max_tokens_per_page to control content distribution.

search_domain_filter
string

A list of domains/URLs to limit search results to. Maximum 20 domains.

max_tokens_per_page
integer

Controls the maximum number of tokens retrieved from each webpage during search processing. Higher values provide more comprehensive content extraction but may increase processing time.

country
string

Country code to filter search results by geographic location (e.g., 'US', 'GB', 'DE').

search_recency_filter
string

Filters search results based on recency. Specify 'day' for results from the past 24 hours, 'week' for the past 7 days, 'month' for the past 30 days, or 'year' for the past 365 days.

search_after_date
string

Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g., '10/15/2025').

search_before_date
string

Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g., '10/16/2025').

last_updated_after_filter
string

Perplexity-Specific: Filters search results to only include content last updated after this date. Format should be %m/%d/%Y (e.g., '07/01/2025').

last_updated_before_filter
string

Perplexity-Specific: Filters search results to only include content last updated before this date. Format should be %m/%d/%Y (e.g., '12/30/2025').

search_language_filter
string

Perplexity-Specific: Filters search results to only include content in the specified languages. Accepts an array of ISO 639-1 language codes (2 lowercase letters). Maximum 10 language codes per request.

    Orthogonal - Giving AI agents the tools they need.