Skip to main content
POST
/
search
Search
curl --request POST \
  --url https://api.perplexity.ai/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "latest AI developments 2024"
}
'
{
  "results": [
    {
      "title": "<string>",
      "url": "<string>",
      "snippet": "<string>",
      "date": "2025-03-20",
      "last_updated": "2025-09-19"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
query
required

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

Example:

"latest AI developments 2024"

max_results
integer
default:10

The maximum number of search results to return.

Required range: 1 <= x <= 20
max_tokens
integer
default:25000

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.

Required range: 1 <= x <= 1000000
Example:

25000

search_domain_filter
string[]

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

Maximum array length: 20
Example:
["science.org", "pnas.org", "cell.com"]
max_tokens_per_page
integer
default:2048

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.

Example:

2048

country
string

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

Example:

"US"

search_recency_filter
enum<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.

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

"week"

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').

Example:

"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').

Example:

"10/16/2025"

Response

200 - application/json

Successfully retrieved search results.

results
SearchResult · object[]
required

An array of search results.