How do I access the XML from the Google Mini / GSA?

Posted on January 26th, 2006 in GSA, Google Mini, Q&A, XML API by Paul

As well as the standard web interface, the Google Mini and Google Search Appliance have an XML interface which gives you a results set back in XML.

To access the XML, you use a scripting language to use HTTP GET with a particular URL:

For XML without a DTD:
http://www.miniaddress.com/search?q=searchphrase&output=xml_no_dtd &client=collectionname&site=collectionname

Where ‘www.miniaddress.com’ is the address of your search appliance (this can also be an IP address,) ‘collectionname’ is the name of your collection, and ’searchphrase’ is what you are searching for.

If you want the DTD, change output=xml_no_dtd to output=xml

You can set lots of flags in the URL to do things like change the start number of the results set, or change the encoding of the results coming back to UTF-8 or latin. You can look up the various flags in the GSA XML reference.

5 Responses to 'How do I access the XML from the Google Mini / GSA?'

Subscribe to comments with RSS or TrackBack to 'How do I access the XML from the Google Mini / GSA?'.

  1. Steve Harrison said,

    on April 13th, 2007 at 9:45 pm

    “You can look up the various flags in the GSA XML reference.”

    Hi, it seems like that reference link no longer exists. And good alternatives? I’ve been tasked to consume th’ XML via .NET 2.0 (c#). Thanks.

  2. Paul said,

    on April 16th, 2007 at 8:13 am

    Thanks Steve, I’ve updated the link to the new home of the XML doc

  3. Mike Des said,

    on May 18th, 2007 at 12:36 pm

    Could you be kind enough to post a PHP example of this could you?

    Thanks

  4. Paul said,

    on May 18th, 2007 at 1:08 pm

    Hi Mike,

    I can happily show the fopen or cURL way of getting the XML back, but I won’t be putting up the PHP code for parsing the XML or doing anything with it, because I usually get to charge clients for that. Admittedly, that’s the PHP4 code. If you’re getting the choice, it’d be much easier for you to do the work in PHP5 where the XML parsing is much better.

    Cheers

    Paul

  5. hazarth said,

    on December 21st, 2007 at 10:42 am

    i implemented gsa search functionality to my appilications
    while searching with “testing” the output is not comming

Post a comment