google-search
google-search copied to clipboard
Support for more SERP features
Google SERP has many different features, at the moment the Search() only returns the Organic results
Some of the other features that the SERP contains are
- Featured Snippet
- Local Pack
- Reviews
- Sitelinks
- Videos
- Top Stories
- Images
- Knowledge Panel
- FAQs
- People Also Ask
- Related Searches
- Google Flights Block
- Hotel Pack
- Job Listings
- Google Ads
- Shopping Ads (Product Listing Ads)
- Rich Snippets
To keep backward compatibility it would be best to maintain the Search() return types.
As every remote call contains all the results for all of the SERP features, process leaves two options.
- Process the DOM and only return the selected feature
- Process the DOM and return all features found on the DOM
- Retrieve the DOM and have calls to feature functions process the DOM and return that features result
This patch has an option to maintain the current Search()
I have included for example only showing what option 2 or 3 could look like
Option 2 example line 313
Option 3 example line 320
This is not intended to mare at this stage