fields.snippets to true. Each result’s snippets array holds its highest-scoring passages, in the order they appear in the document, so you can work with focused excerpts instead of a document’s full content.
Snippets are available on the
news and wikipedia scopes. The companies and people scopes don’t produce snippets; snippets comes back as an empty array for those scopes even when requested.Sample response
Get snippets alongside content
fields selects each member independently, so request content and snippets together to get both the full document and its top passages in one response.
Sample response
content here carries the article’s full 3,919 characters; snippets picked out a single sentence from a minister’s quote near the end of the piece, well past where this truncated content preview ends.
fields.content defaults to true, so omitting fields entirely returns content but not snippets. Once you pass a fields object, only the members you set to true are populated. Set content explicitly if you still want it alongside snippets.