Write a query with a clear purpose
Include the subject and the detail you need. Avoid combining unrelated questions into a single query.
For multi-part research, search each question separately, compare the sources, and let the evidence guide follow-up queries. A query is retrieval input, not a reliable way to enforce an output format or a domain restriction.
Choose the result count deliberately
Begin with 5–10 results. Increasecount when you need broader source coverage, up to 50. More results also mean more context for your application to process; the maximum count is not always the most useful choice.
Preserve source order initially. Select relevant evidence before adding it to a model’s context window, and avoid repeatedly including the same URL across searches.
Use the right amount of context
Full webpage text is capped at 5000 characters per result by default. Use a positive
max_characters to change the cap; the object itself enables text. Text mode replaces snippet with text. Source text can be shorter or missing, and it is evidence for your model rather than a generated answer. Select relevant sources before asking the model to synthesize them.
Match freshness to the question
Focus on the right domains
Use structured domain filters rather than relying on the query to enforce source selection:Refine sparse or weak results
- Broaden an overly narrow freshness window.
- Replace ambiguous terms with the specific concept, product, or organization.
- Break a compound question into smaller searches.
- Increase the result count only when you need additional coverage.
Build reliable agent loops
Set a request timeout and a limit on search attempts. Stop when you have enough evidence to answer, or tell the user when evidence remains insufficient. For transient server failures, retry with bounded backoff and jitter. Fix invalid requests and credentials before retrying. A429 can indicate a burst limit or exhausted daily allowance; check the error and Dashboard. Daily allowance resets automatically at 00:00 UTC.
See Errors & troubleshooting for response codes and Plan & usage for account rules.

