curl --request POST \
--url https://api.perplexity.ai/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "latest AI developments 2024",
"max_results": 10,
"search_domain_filter": [
"science.org",
"pnas.org",
"cell.com"
],
"max_tokens_per_page": 1024,
"country": "US",
"search_recency_filter": "week",
"search_after_date": "10/15/2025",
"search_before_date": "10/16/2025"
}
'{
"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",
"max_results": 10,
"search_domain_filter": [
"science.org",
"pnas.org",
"cell.com"
],
"max_tokens_per_page": 1024,
"country": "US",
"search_recency_filter": "week",
"search_after_date": "10/15/2025",
"search_before_date": "10/16/2025"
}
'{
"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.
The search query or queries to execute.
"latest AI developments 2024"
The maximum number of search results to return.
1 <= x <= 20A 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.
1024
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
The title of the search result.
The URL of the search result.
A brief excerpt or summary of the content.
The date that the page was crawled and added to Perplexity's index.
"2025-03-20"
The date that the page was last updated in Perplexity's index.
"2025-09-19"
Was this page helpful?