If user search a particular keyword in google and google returns set of results with url. Now if user comes to my website after clicking any result, then how can I know that search keyword.
In bing and yahoo I am able to get this using "q" and "p" respectively. Like "http://www.bing.com/search?q=......" and "http://in.search.yahoo.com/search......?p=......&.....".
But in google I am unable to find any parameters to get search keyword. I am using php.
Please help.
EDIT:
It is not possible to get the search string once you click on a search result.
if I search for stackoverflow.. this is what I get.. link not showing up properly in a comment..
so adding an answer.. you should be able to "?q=" as well for google
https://www.google.com/search?q=stackoverflow&rlz=1C1CHFX_enUS524US524&oq=sta&aqs=chrome.3.69i60l3j69i59j69i57j69i65.2857j0&sourceid=chrome&ie=UTF-8
Related
I am trying to find out solution of this from so many days and couldn't find any solution of this please help me with the solution.
I am using popup overlay of Google CSE. I am using only allowing few sites to show the search results.
If search result is available then it shows like this = https://prnt.sc/qAt0KbTVPNb7
If search result is not available then it shows like this type of empty result interface = https://prnt.sc/WnaeQ6_7yyPF
I want this to automatically trigger close button if no search result is exist.
How can I do this? Please help me with this :(
I am using google custom search through the api google_api_client python. I want to retrieve the pdf documents for a particular query. Below is the function that does it.
def query_results(service,q=None,startIndex=1,siteSearch=None,fileType=None):
return service.cse().list(
q=q,
cx='000906600611484344115:o9lfdh9y1m5',
start=startIndex,
siteSearch=siteSearch,
fileType=fileType,
safe='off'
).execute()
When i call the above method passing q="alienware", filetype="pdf" and siteSearch="google.com", I get hardly one result. But then when I type the same query filetype:pdf alienware in google search through browser, I got plenty of results. Did I do any wrong ? or Is there an issue with the api itself ?.
When i say I got plenty of results, I mean the below image
Below is the configuration of custom search
Specifying siteSearch="google.com" means you will only search pages on google.com. It is equivalent to searching for site:google.com on Google. Remove the siteSearch and you should get the expected results.
I want to search results from "Google News" via "Google Custom Search Engine Api (CSE)" based on location/country and keyword.
I tried using it by setting up a CSE which only searches inside the site "news.google.com" but then it only returns old news article clippings. Not sure how to grab the recent news articles. Also, i noticed that if we set schema type NewsArticle, its not accurate as not all news sites having this schema type of page.
I knew that there is a workaround to use RSS feeds for getting google news and it returns results as required. Example - https://news.google.com/news/feeds?hl=en&q=corruption&ie=utf-8&num=10&output=rss . But, I afraid this is not a correct and recommended way to get go with.
Will appreciate if anyone could advice right setting in CSE or other recommended solution.
http://developers.box.com/docs/#search
This api returns only the files/folders related to the search query. How do I show the search excerpts?
Should I integrate solr/lucene for search?
EDIT:
I mean excerpt from the content of the files/documents. The search snippets that you see like in google.
Example:
http://www.bestrank.com/files/uploads/39/image/anatomy-of-a-search-engine-snippet.png
The description in this case.
The Box API currently does not provide this in the search response, but we're looking at adding it sometime in the future.
On my search results page I would like to display the phrase that the user searched for.
For example, instead of using the title Search Results: as you can see in the screenshot, I would instead like to use the title Search Results for vitae:
Is it possible to pull in the searched word/s?
At present the title is hard coded within the web part container that surrounds the search results web part.
Screenshot of search results currently:
I have had a response back from Kentico about how to do this. See solution below.
Your Search Results: text is filled probably in the Container title
property of your smart search web part, so please just change it to
the following one:
Search Results for {?searchtext?}:
This works perfectly! {?searchtext?} pulls in the searched word.