curl --request POST \
--url https://api.perplexity.ai/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'{
"results": [
{
"title": "<string>",
"url": "<string>",
"snippet": "<string>",
"date": "<string>",
"last_updated": "<string>"
}
],
"id": "<string>",
"server_time": "<string>"
}Search the web and retrieve relevant web page contents.
curl --request POST \
--url https://api.perplexity.ai/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>"
}
'{
"results": [
{
"title": "<string>",
"url": "<string>",
"snippet": "<string>",
"date": "<string>",
"last_updated": "<string>"
}
],
"id": "<string>",
"server_time": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Search query (required)
ISO 3166-1 alpha-2 country code
2Maximum number of results to return
1 <= x <= 20Maximum tokens for context
1 <= x <= 1000000Maximum tokens per page
1 <= x <= 1000000ISO 639-1 language codes (2-character max)
202Limit search results to specific domains (max 20)
20253Return results updated after this date (MM/DD/YYYY)
Return results updated before this date (MM/DD/YYYY)
Return results published after this date (MM/DD/YYYY)
Return results published before this date (MM/DD/YYYY)
Filter by publication recency (hour/day/week/month/year)
hour, day, week, month, year Was this page helpful?
Suggestions