Search code examples
iphoneiosuiwebviewgoogle-search

Google search policy


I have question about using Google search. Can I use a custom google search in my native iOS app instead of using their api tools, is this a problem for google?

I write html page ( http://barzyczak.vot.pl/search.html?q=test ):

<!DOCTYPE html>
<html>
    <head>
        <title>Element V2: Results Only Layout Demo</title>

        <!-- Put the following javascript before the closing </head> tag. -->
        <script>
            (function() {
             var cx = 'xyz';
             var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
             gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
             '//www.google.com/cse/cse.js?cx=' + cx;
             var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
             })();
            </script>
    </head>

    <body>
        <!-- Place this tag where you want the search results to render -->
        <gcse:searchresults-only enableOrderBy="false"></gcse:searchresults-only>
    </body>

I do request to site with above content in my iOS app and receives the results. I show this results in UIWebView:

enter image description here

So Can I use

- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationTyp

and redirect user to my UIViewController? Is this ok for Google policy?

Can I intercept/catch user's click on the link and open native application view instead of webview or should I open desired page in webview, and then redirect (with 301 code) with iOS schema URL, which open native app view (so really simulate click in google)?

Ps. I know about Google API, but this is not ok for me.


Solution

  • Google's Custom Search Terms of Service (TOS) can be found at http://www.google.com/cse/docs/tos.html. I would suggest reading these thoroughly. Specifically section 1.3 which I have copied (as of 17-Mar-2013):

    1.3 Your Obligations. You shall receive a Query from the End User and shall forward that Query to Google. You may not in any way frame, cache or modify the Results produced by Google, except as otherwise agreed to between You and Google. Google will not be responsible for receiving Queries from End Users or for transmission of data between You and Google's network interface. You shall be responsible for providing all hardware and software required to perform Your obligations under the Terms of Use, including but not limited to the following: (a) implementing and maintaining the Site, (b) implementing and maintaining the interface between the Site and the Service, and (c) receiving a Query from an End User and transmitting the Query to Google.

    I am not a lawyer, but "You may not in any way frame, cache or modify the Results produced by Google, except as otherwise agreed to between You and Google." would seem important in your situation.

    Unless you are paying for Google Site Search, you cannot display the results without displaying the ads.