Slashdot Mirror


Google to Offer API

philipx writes "From the ruby-talk archives here's a little interesting snippet from a post you have to check out: "Here at Google, we're about to start offering an API to our search-engine, so that people can programmatically use Google through a clean and clearly defined interface, rather than have to resort to parsing HTML." It goes on talking about SOAP and I think this is utterly cool."

8 of 217 comments (clear)

  1. DoS Google? by David+Kennedy · · Score: 3, Interesting

    The only problem I can see with this is that there was a recent thread on here about Google blocking a lump of IP addresses as someone in there was automatically querying way too often and affecting their load.

    With the exposed API I could see, by malice or sheer accident, floods of queries coming in...

  2. Contradicts the terms of use by Anonymous Coward · · Score: 4, Interesting
    Google Terms of Service. Some excerpts:

    Personal Use Only [...] You may not take the results from a Google search and reformat and display them

    No Automated Querying: You may not send automated queries of any sort to Google's system without express permission in advance from Google.
    So how useful might that API be if you can't do anything with it...

    1. Re:Contradicts the terms of use by red_dragon · · Score: 5, Interesting

      I'd assume that the API would be subject to a different set of terms and conditions than those for the main site. Given that it'll probably be a pay-for-use service (as another poster hinted at), it'd most certainly be that way.

      --
      In Soviet Russia, Jesus asks: "What Would You Do?"
  3. Explanation / Keep Supporting Google by Anonymous Coward · · Score: 3, Interesting

    The first page I visit every morning
    ---

    The following is the preliminary code that a particular Google sysadmin (ian@) is trying out. He'd prefer to have a single WSDL file do all of the configure (from Google's end to client), but he first needs to get some advice from an experienced Ruby hacker.

    Also, let's keep in mind that this API will actually be decreasing Google pageviews and hits, which will in turn make their AdWords, AdWordsSelect, and textads less effective. So, it's our duty to continue to support Google and show them that the free/open source software people are behind them 100%. We know that Teoma just doesn't deliver, and Google's already got 3 billion pages indexed and cached.

    Support Google today, because they're the future of information indexing on the Web!

    --- begin code ---

    #!/usr/bin/ruby

    require 'soap/driver'

    endpoint = 'http://api-ab.google.com/search/beta2'
    ns = 'urn:GoogleSearch'
    key = 'xxxxxxxxxxxxxxx'
    service = 'file:GoogleSearch.wsdl'
    query = ARGV.shift || 'foo'

    soap = SOAP::Driver.new(nil, nil, ns, endpoint)

    # uncomment the next line to dump the traffic on the wire
    #
    #soap.setWireDumpDev(STDERR)

    soap.addMethodWithSOAPAction('doGoogleSearch', ns, 'key', 'q', 'start',
    'maxResults', 'filter', 'restrict',
    'safeSearch', 'lr', 'ie', 'oe')
    r = soap.doGoogleSearch(key, query, 0, 10, false, nil, false, nil,
    'latin1', 'latin1')

    printf "Estimated number of results is %d.\n", r.estimatedTotalResultsCount
    printf "Your query took %6f seconds.\n", r.searchTime

  4. Is this a subscription service? by Idimmu+Xul · · Score: 4, Interesting
    key = 'xxxxxxxxxxxxxxx'

    I havent tried to get it to work yet, due to not having ruby installed, but does this imply some sort of subscription service?

    Possibly a new way for them to raise revenue? Im assuming that the bold line means the authors key has been blanked out so other people cant abuse this service for free?

    Lameness filter encountered. Post aborted! Reason: Too much repetition. :/

    --
    The problem with slashdot is that most of its users were bullied and stuffed into lockers as kids!
  5. Re:This is the beginning of the revolution by Carnage4Life · · Score: 3, Interesting

    It's not MSDN and MSN.

    I'm curious as to whether people would actually want such functionality from MSDN. It's one thing to be able to do a Google search from a function call and get the results back as XML but do people want API docs and technical articles retrieved via getArticle() and getAPI() webmethods?

    One place where it might be useful however is KnowledgeBase articles. Perhaps a web service that retrieves a KB article given the Q number (e.g. Q123456) might be useful.

    Disclaimer: This post is my opinion on doesnot reflect the thoughts, strategies, intentions or opinions of my employer.

  6. Good to see this idea return by drok · · Score: 4, Interesting

    Last year Google temporarily had an XML interface available using a query like: http://www.google.com/xml?q=slashdot

    Of course, now it's just forbidden. I am surprised they would go back to such a service, it would seem to wind up losing revenue for them depending upon whether or not people are good about passing along whatever Ad-words Google returns. They could expect the traffic to be low enough to not matter compared to the continued word-of-mouth benefit. Or access to the SOAP interface could be offered as a subscription model (pure speculation on my part).

    -Robert

  7. Actually, it works quite OK. by Christopher+B.+Brown · · Score: 3, Interesting
    If you look at the way it works right now, using the interface requires an authorization key.

    If you run the Ruby script, as is, the result is thus:

    #: Exception from service object: Invalid authorization key: xxxxxxxxxxxxxxx (SOAP::FaultError)

    If somebody starts abusing a particular key, it's a no-brainer for Google to shut the key off.

    --
    If you're not part of the solution, you're part of the precipitate.