I have a NextJS site that uses a headless WP set-up. So I am using axios to get some search results which works well but...It only returns a few bits of information.
id: 67
subtype: "page"
title: "Test Title"
type: "post"
url: "http://urlhere.com"
I am using this endpoint: http://headlesswp.local/wp-json/wp/v2/search?search= + e.target.value
Is there anyway to return more data. Specifically the snippet of text that the search results has found. Just like how Google does it essentially. So searching "Lorem Ipsum" will return another value like:
snippet: "...Lorem ipsum dolor sit amet, consectetur adipiscing elit..."
Cheers