Skip to main content
POST
Search the Web
The Search API returns ranked results, not a generated answer. For an answer with citations, use the Agent API. Both are first-party Perplexity APIs at api.perplexity.ai; neither routes through OpenRouter. To make your first request, see the Search API quickstart.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
query
required

One search query, or an array of 1 to 5 queries. Each query is 1 to 8192 bytes of UTF-8; the limit counts bytes, not characters. max_results applies to the combined results of all queries.

Required string length: 1 - 8192
max_results
integer
default:10

Maximum number of results in the response, across all queries in the request. 1 to 20 for web and fast, 1 to 50 for people.

Required range: 1 <= x <= 50
search_type
enum<string>
default:web

Search type: web for general web search, fast for lower-latency web search, or people for people search. max_results above 20 is only supported for people.

Available options:
web,
fast,
people
country
string

ISO 3166-1 alpha-2 country code, such as US. Returns results more relevant to that country.

Required string length: 2
search_language_filter
string[]

ISO 639-1 language codes, such as en or fr. Returns results in those languages. Up to 20 codes.

Maximum array length: 20
Required string length: 2
display_server_time
boolean
default:false

When true, the response includes server_time.

snapshot_as_of
string

Search the web as of this RFC 3339 time with a time zone, such as 2026-11-01T00:00:00Z. Each result comes from the copy of the page saved at or before this time. It must not be in the future or more than 365 days ago. Cannot be combined with search_recency_filter, the publication date filters, the last-updated filters, or search_type people. A page that can't be shown as of this time is omitted, so the response can have fewer than max_results results, or none.

search_domain_filter
string[]

Include or exclude up to 200 domains or URLs, each up to 253 characters. Prefix an entry with - to exclude it.

Maximum array length: 200
Maximum string length: 253
last_updated_after_filter
string

Return results updated after this date (MM/DD/YYYY)

last_updated_before_filter
string

Return results updated before this date (MM/DD/YYYY)

search_after_date_filter
string

Return results published after this date (MM/DD/YYYY)

search_before_date_filter
string

Return results published before this date (MM/DD/YYYY)

search_recency_filter
enum<string>

Filter by publication recency (hour/day/week/month/year)

Available options:
hour,
day,
week,
month,
year

Response

Successful Response

results
ApiSearchPage · object[]
required

Ranked results. With several queries, results from all queries share one list.

id
string
required

Request ID.

server_time
string | null

Server processing time, such as 0.163s. Not included in responses by default.