Categories: Implementation :

Custom Search Element API is fully documented now!

Showing 1-12 of 14 messages
Custom Search Element API is fully documented now! hxu-cse 1/13/12 9:27 PM
(unknown) 1/25/12 8:31 PM <This message has been deleted.>
(unknown) 1/25/12 8:34 PM <This message has been deleted.>
Re: Custom Search Element API is fully documented now! omr 1/25/12 8:36 PM
Please correct an erroneous example in the Element reference ("opt_options" subsection).  This code cannot work as written.

  var options = { 'google.search.Search.RESTRICT_EXTENDED_ARGS' :
    {'as_sitesearch' : 'examplepetstore.com/dogs/*'} };

I'd suggest rewriting that example as follows:

  var options = {};
  options[google.search.Search.RESTRICT_EXTENDED_ARGS] = {
    'as_sitesearch' : 'examplepetstore.com/dogs/' };


-- omr
Re: Custom Search Element API is fully documented now! hxu-cse 2/9/12 3:57 PM
Thanks for pointing this out!  The doc should have been fixed.
Re: Custom Search Element API is fully documented now! _CSESurfer 2/17/12 12:38 PM
I noticed this link target only works for Web Results:
 
customSearchControl.setLinkTarget(google.search.Search.LINK_TARGET_BLANK);
 
How about for Ads by Google? 
 
...It's default is _SELF or _PARENT and does not open to new window.
Re: Custom Search Element API is fully documented now! Mareck 10/17/12 7:06 AM
On https://developers.google.com/custom-search/docs/js/cselement-reference it still shows:

options[google.search.Search.RESTRICT_EXTENDED_ARGS] = {'as_sitesearch' : 'examplepetstore.com/dogs/*'};
This however no longer works and gives you no results when searching. It should be:
options[google.search.Search.RESTRICT_EXTENDED_ARGS] = {'as_sitesearch' : 'examplepetstore.com/dogs'};
For one of my sites the search hasn't been working for a while because of this change (No idea when it was changed. Visitors usually don't report errors but just leave when something unexpected happens). 

Took me quite some time to figure this out because the documentation is wrong.

Re: Custom Search Element API is fully documented now! vikramv2575 11/19/12 6:00 PM
I am having trouble using the API to modify the sites in a Custom Search Engine. When I use the API in the documentation, the return code says that it is done but I cannot see the changes while querying the CSE nor when looking at the CSE using the Control Panel.
The API seems to be wrongly documented. Is there anywhere that you can point me?

Thanks,
Vikram
Re: Custom Search Element API is fully documented now! Ambika0001 1/15/13 8:00 AM
Can you tell me exactly how are you trying to add sites to your cse?
Re: Custom Search Element API is fully documented now! Rudy Martinez 2/1/13 12:19 PM
how I can remove remove the Google logo that is in the search box and put the logo on another  box my web?...I can do this?
Re: Custom Search Element API is fully documented now! Rudy Martinez 2/1/13 2:17 PM
(unknown) 4/5/13 8:25 AM <This message has been deleted.>