For my project I’ve created a few google custom search engines on certain topics. The idea is that when people search on the main (general) engine that they get an alert if there are results on the other (topical) engines.
Right now I cannot figure out how to execute this idea. At first I thought I could get the query from URL and than get the number of results using file_get_contents as described in this topic, and then create an alert if number of results != NULL, but file_get_contents doesn’t seem to work on custom search engines (is this true?) .
The same thread killed the idea to get the number of results using the Custom Search JSON API because I will have to do this for every search on the main engine and 100 free queries is not enough.
Before I let go of this idea I am reaching out to see if there is really no way of getting this done.
I am using Custom Search Element API 2.0 on WordPress. Search box is rendered in the header and the results on the page. The alert would have to appear in the sidebar.
Any help is really appreciated !
Also open to hear other creative solutions to achieve the goal (inform of results on topical engine)
Read more here: Alert if search query have results in another gcse