Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way of displaying 'Related searches' when using Google Custom Search API

I am using the Google Custom Search API to display google search results on my website, however, I would like to display 'Related Searches' like the ones shown at the bottom of a normal google search.

Is this possible? And if so, how do you do it?

Thanks in advance

like image 957
user1934692 Avatar asked Nov 12 '22 14:11

user1934692


1 Answers

I know relatedQueries.enabled can be used in "get" format see the example for returned results as shown below, all from this link https://developers.google.com/shopping-search/v1/reference-content-module-related-queries

GET https://www.googleapis.com/shopping/search/v1/public/products?country=US&q=shoes&relatedQueries.enabled=true&key=key

{
 "kind": "shopping#products",
 ...
 "relatedQueries": [
  "jordan shoes",
  "nike shoes",
  "dc shoes",
  "puma shoes"
 ]
 ...
 "items": [
  ...
 ]
}
like image 95
rezand Avatar answered Jan 04 '23 01:01

rezand