Overview
search_domain_filter controls which sites appear in results. Pass an array of entries in one of two modes:
Send up to 200 entries, each up to 253 characters. You can mix entries to include with entries to exclude. Write entries without the protocol or
www, for example "nature.com", not "https://www.nature.com". The filter applies in addition to the query and any other filters, and the API reference documents the request parameters.
Each entry can be:
Add
- to any of these to exclude it. For example, ["reddit.com", "-reddit.com/r/all"] searches a site except one section.
Include domains
This request keeps results from three journals.Response
Response
Exclude domains
Prefix each entry with-. This request searches the web except Wikipedia and Reddit:
Response
Response
Filter by path
This request keeps results undernature.com/articles:
Response
Response
Filter by top-level domain
This request keeps results from.gov domains:
Response
Response
Match subdomains
A root domain matches its subdomains. This request with"wikipedia.org" returns pages from two Wikipedia subdomains:
Response
Response
Next Steps
Date and Time Filters
Restrict results by publication date, last-updated date, or recency.
Language Filter
Return results in specific languages.
Use Search in Your Agent
Give an OpenAI, Anthropic, or Gemini agent a web search tool.
API Reference
Every request parameter, the response schema, and error responses.