The
search_domain_filter parameter allows you to limit search results to specific domains or URLs, enabling focused research from trusted sources. You can also exclude domains by prefixing them with a - character.Domain filters support both allowlisting (include specific domains) and denylisting (exclude specific domains). You can specify up to 20 domains per request. Domains should be provided without the protocol (e.g., “nature.com” not “https://nature.com”).
Overview
The domain filter for the Search API allows you to control which sources appear in your search results by limiting them to specific domains or excluding unwanted domains. This is particularly useful when you need to:- Focus research on authoritative or trusted sources
- Search within specific publication networks or organizations
- Exclude unreliable or off-topic domains from results
- Build domain-specific search applications
- Conduct competitive research within specific industry domains
search_domain_filter parameter accepts an array of domain strings and supports two filtering modes:
Allowlisting (Include Domains)
Allowlisting restricts results to only the specified domains. This is useful when you want to search exclusively within trusted or relevant sources.Denylisting (Exclude Domains)
Denylisting excludes specific domains from your results by prefixing them with a- character. This is useful when you want broad coverage but need to filter out specific sources.
You cannot combine allowlisting and denylisting in the same request. Use either inclusion (no prefix) or exclusion (
- prefix), but not both.Examples
1. Allowlisting Academic Sources This example limits search results to authoritative academic publishers: Request ExampleParameter Reference
search_domain_filter
- Type: Array of strings
- Format: Domain names without protocol (e.g., “example.com”)
- Description: Filters search results to only include (allowlist) or exclude (denylist) content from specified domains
- Optional: Yes
- Maximum: 20 domains per request
- Allowlisting Example:
"search_domain_filter": ["nature.com", "science.org"] - Denylisting Example:
"search_domain_filter": ["-spam.com", "-ads.net"]
Domain Format Guidelines
Correct Domain Formats:"nature.com"- Root domain"blog.example.com"- Subdomain"arxiv.org"- Root domain"-unwanted.net"- Denylist with prefix
- ❌
"https://nature.com"- Don’t include protocol - ❌
"nature.com/"- Don’t include trailing slash - ❌
"nature.com/articles"- Don’t include path - ❌
"www.nature.com"- Avoid www prefix (use root domain)
Best Practices
Domain Selection Strategy
- Use Root Domains: Specify root domains (e.g., “nature.com”) rather than subdomains or specific paths. The filter will match all content from that domain.
- Be Specific: Choose domains that are directly relevant to your search query to ensure high-quality results.
- Quality Over Quantity: Using fewer, highly relevant domains often produces better results than maximizing the 20-domain limit.
- Consider Domain Authority: Prioritize authoritative sources in your field for more reliable information.
Filtering Mode Selection
- Allowlisting: Use when you have a specific set of trusted sources you want to search within (e.g., academic research, official documentation).
- Denylisting: Use when you want broad coverage but need to exclude known problematic sources (e.g., spam sites, social media).
- Never Mix: Do not combine allowlisting and denylisting in the same request. Choose one approach based on your needs.
Client-Side Validation
Validate domain formats on the client side before sending requests:Performance Considerations
- Result Availability: Narrowing to specific domains may reduce the number of available results. Be prepared to handle cases where fewer results are returned than requested.
- Domain Coverage: Ensure the domains you specify actually contain content relevant to your query. Overly restrictive filters may return zero results.
- Combination Effects: Domain filters combined with other restrictive filters (date, language) can significantly reduce result counts.
For best results, combine domain filtering with other filters like
search_recency_filter or search_language_filter to narrow down your search to highly relevant, timely content from your target sources.