Based on which criteria google AJAX Search API will give search results? - api

I have used google search API to get the results of google search but it gives me different results as I have searched directly in google.com.
So,if anyone know here how is it possible then let me know.why both results are not same for same search keyword ?

Most likely the filter option for duplicate content and perhaps language option cause the results to differ.

Related

Google query for a mass of related websites

Is there a way to load a bunch of urls like a hundred of them and query in google to find other related to those.
To be more specific the command as_rq=www.example.com in google query searches sites that are related to this url, what if I want to search for a vast amount of urls is there an option or I'll have to traverse all the urls one by one.
Unfortunately it is not possible to do multiple url queries. I've tried to do this myself before with no luck after searching multiple online forumns
Yeap it is possible via Google CSE(custom search engine) API where on the required parameter q=exampleQuery you insert q=as_rq=www.example.comand by using annotations you can parametrize your search results.

Google autocomplete api for my site

Is it possible for google autocomplete api to specify to return results only for my site not for all sites? I see that there is param ds, but only purpose for that is to search in youtube. So how can I get autocomplete or maybe related or suggested search words only for single site?
I needed the very same thing and so far the only way I found to get this working is to create a custom search engine and then add it as a parameter to the autocomplete call:
http://clients1.google.com/complete/search?client=partner&gs_ri=partner&partnerid={0}&ds=cse
Where {0} is your custom search id
Certain features such as returning the results as XML don't work if you use the partner id but at least all the autocomplete results will be from your site.
You can also have multiple search engines and use different ones in different textboxes. Results are just a json string you parse.
Good luck

Customize Google Custom Search

Does anyone know how to span the search result set over all of the links provided in google custom search . For Example, if I have provided sites like site 1,site 2....site n to search from ,then I want say top five results from all of these individual websites as JSON. Is there a way to achieve this.
I know this may be a little late but might be able to help someone out .
This will return 2 results via the REST API for GCSE.
https://www.googleapis.com/customsearch/v1?key=YOUR-KEY_HERE&cx=CX_HERE&fields=kind,items&filter=1&num=2&prettyPrint=true&q=querystring
its the num=2 part your looking for...

how to correct spelling mistakes in Google custom API

I am using Google's custom search API, I make an HTTP request to a URL that looks like this:
https://www.googleapis.com/customsearch/v1?key=<my-key>&cref=&num=10&q=how+can+i+do+htis
if you search for "how can i do htis" on Google you are told "Showing results for how can i do this", and give you some results (call them result set A)
but if you use the API to search for the misspelled string, you get different results than those of A... Searching with a correctly spelled string gives you result A, which matches the ordinary search service on Google
Is there a way to search directly using the suggested string? I want to use the API I can't afford implementing a spell checker myself that can also correct people names and everything
I think what you want to do is possible using the spelling suggestions of Google. This is part of the xml-results returned by your query.
See API here.

Number of results from CSE do not match google total results number

In Google Custom Search Engine if I make a search like this:
https://www.googleapis.com/customsearch/v1?key={$apikey}&q=####KEYWORD#####&cref={$cref}&alt=json
with my $apikey and my $cref I get a json results that do not match with the results of google via browser.
I've configured my search engine to search all the web as described here but I've noticed that many results are missing, for example the ones from forums.
Is there a way to specify to CSE to search also the forums? I want to use the same results as google classic search.