Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 568
Roman Barzyczak Avatar asked Mar 11 '13 13:03

Roman Barzyczak


2 Answers

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.

like image 138
ToddR Avatar answered Oct 16 '22 16:10

ToddR


UIWebView is similar to safari browser.

So, If you are loading ANY URL in UIWebView, then dont worry. Loading request with any url in UIWebView is as same as pasting a url in browser so there is no need to worry. But if you want to open ads of google in UIViewController or with any other control like label (eg. you are showing ads on UILabel or UITextView) then there should be problem with policies.

I am not so sure about google policy, but if you are using only UIWebView then there is no need to worry. Go ahead.........

And for google searches i have used one url that you can try....

    NSString * urlString = [NSString stringWithFormat:@"https://www.google.co.in/webhp#hl=en&sugexp=les%%3B&gs_nf=1&tok=LZGxyqNyXgb5XCemHei1Fg&cp=4&gs_id=g&xhr=t&q=%@", self.txtSearch.text];
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]];

Hope this post will help you..............

Have a happy coding...........

EDIT:- YOU CAN NOT PERFORM MONEY TRANSACTIONS IN WEBVIEW (PROBABLY BECAUSE OF APPLE'S IN-APP PURCHASE POLICY)

like image 30
Nirav Gadhiya Avatar answered Oct 16 '22 15:10

Nirav Gadhiya