Using the RESTful interface to Google's AJAX Search API for "Did you mean"?
Question: Is it possible to get spelling/search suggestions (i.e. "Did you mean") via
the RESTful interface to Google's AJAX search API? I'm trying to access this
from Python, though the URL query syntax is all I really need.

Thanks!


Answer: the Google AJAX API don't have a spelling check feature see
[this](https://groups.google.com/group/google-ajax-search-
api/browse_thread/thread/61eb608918f00632/ee794142dbf87046?lnk=raot), you can
use the [SOAP
service](http://code.google.com/apis/soapsearch/reference.html#1_3) but i
think it's no longer available .

at last you can look at yahoo API they have a feature for [spelling
check](http://developer.yahoo.com/search/web/V1/spellingSuggestion.html).

**EDIT :** check this maybe it can help you:

    
    
    import httplib
    import xml.dom.minidom
    
    data = """
    <spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1">
        <text> %s </text>
    </spellrequest>
    """
    
    word_to_spell = "gooooooogle"
    
    con = httplib.HTTPSConnection("www.google.com")
    con.request("POST", "/tbproxy/spell?lang=en", data % word_to_spell)
    response = con.getresponse()
    
    dom = xml.dom.minidom.parseString(response.read())
    dom_data = dom.getElementsByTagName('spellresult')[0]
    
    for child_node in dom_data.childNodes:
        result = child_node.firstChild.data.split()
    
    print result
    

