Have you looked at the Custom Search API (CSAPI)? Check out the docs here:
http://code.google.com/apis/customsearch/docs/dev_guide.html
You will notice that there are resources there to use XML, Javascript, Atom or
JSON. It should be noted, though, that the CSAPI will only search web and
images
Yes, you can search user-generated content AS LONG AS it's in kml
format. What this means is that Google's crawler is looking for kml
files on websites and public MyMaps data, and it is automatically
included in a LocalSearch's results. Limiting to a particular source
of user-generated c