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"
}
]
}Get ranked search results from Perplexity’s continuously refreshed index with advanced filtering and customization options.
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"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A search query. Can be a single query or a list of queries for multi-query search.
"latest AI developments 2024"
The maximum number of search results to return.
1 <= x <= 20The 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.
1 <= x <= 100000025000
A list of domains/URLs to limit search results to. Maximum 20 domains.
20["science.org", "pnas.org", "cell.com"]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.
2048
Country code to filter search results by geographic location (e.g., 'US', 'GB', 'DE').
"US"
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.
day, week, month, year "week"
Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g., '10/15/2025').
"10/15/2025"
Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g., '10/16/2025').
"10/16/2025"
Successfully retrieved search results.
An array of search results.
Show child attributes
Was this page helpful?