Skip to main content
The advanced_settings object on the Search API lets you tune source selection, freshness, excerpt sizing, geo-targeting, and result count. Most callers don’t need it — the defaults are chosen to produce the best results for typical requests, and setting these knobs unnecessarily can hurt quality or latency.

Fields

FieldTypeNotesExample
source_policySourcePolicyControls your sources: include/exclude specific domains and optionally set a start date for freshness control via after_date. Can significantly reduce result quality by excluding relevant pages — use only when absolutely necessary. See Using include_domains below.Source policy example
fetch_policyobjectControls when to return indexed content (faster) vs fetching live content (fresher). Default is to use cached content from the index. Enabling live fetch significantly increases latency. For more info including field details, see Fetch Policy.{"max_age_seconds": 3600}
excerpt_settingsobjectControls excerpt sizes. Provide max_chars_per_result for fine-grained control, or omit to use defaults.{"max_chars_per_result": 10000}
locationstringISO 3166-1 alpha-2 country code for geo-targeted search results. Only a subset of countries are currently supported; unsupported or invalid values (e.g., "uk") are ignored with a warning."us", "gb", "de", "jp"
max_resultsintUpper bound on the number of results to return. Defaults to 10 if not provided.10

Using include_domains

Source policies can significantly reduce result quality by excluding relevant pages from retrieval. Use include_domains and exclude_domains only when absolutely necessary — for compliance-bound corpora, tasks that require a single known publisher, or when specific sources must be blocked.
include_domains restricts retrieval so that only those domains can appear in results—the rest of the web is not searched. Treat it as a hard allow list, not a soft preference. Best practice: Set include_domains only when answers must come exclusively from those domains (for example, internal or compliance-bound corpora, or when the task truly requires a single known publisher). If the model or user might still need the open web, avoid include_domains and instead steer sources in the objective (e.g. “prefer official documentation”) or use exclude_domains when you only need to block specific sites. Full parameter details: Source policy.