Control which search results are returned by applying filters to your web search queries. Filters help you focus on specific domains, time periods, or geographic locations to get more relevant results.Documentation Index
Fetch the complete documentation index at: https://docs.perplexity.ai/llms.txt
Use this file to discover all available pages before exploring further.
Domain Filters
Domain filters allow you to include or exclude specific domains or URLs from search results. Use allowlist mode to restrict results to trusted sources, or denylist mode to filter out unwanted domains. Allowlist mode: Include only the specified domains/URLs (no- prefix)Denylist mode: Exclude the specified domains/URLs (use
- prefix)
You can filter at the domain level (e.g., wikipedia.org) or URL level (e.g., https://en.wikipedia.org/wiki/Chess) for granular control.
Python
Date & Time Filters
Date and time filters help you find content published or updated within specific time periods. You can filter by publication date, last updated date, or use recency filters for relative time periods. Publication date filters: Filter by when content was originally publishedsearch_after_date_filter: Include content published after this datesearch_before_date_filter: Include content published before this date
last_updated_after_filter: Include content updated after this datelast_updated_before_filter: Include content updated before this date
search_recency_filter: Use"hour","day","week","month", or"year"for content from the past hour, 24 hours, 7 days, 30 days, or 365 days. Usehourfor real-time data such as breaking news or live events.
Specific date filters must be provided in the “%m/%d/%Y” format (e.g., “3/1/2025”). Recency filters use predefined values like “hour”, “day”, “week”, “month”, or “year”.
Python
Location Filters
Location filters tailor search results based on geographic context. This is useful for finding local businesses, regional news, or location-specific information. You can specify location using:- Country code: Two-letter ISO 3166-1 alpha-2 code (e.g.,
"US","FR") - City and region: Improve accuracy with city and region names
- Coordinates: Latitude and longitude for precise location targeting
Python
Combining Filters
You can combine multiple filter types in a single request to create highly targeted searches. For example, you might restrict results to specific domains published within a recent time period, or filter by location and date range together.Python
Next Steps
Agent API Quickstart
Get started with the Agent API.
Models
Explore direct model selection and third-party models.