Google.cfc v0.3

Why

It took me a few hours to make the Google API work with Cold Fusion. The results of the search API are a complex java object, so there seemed a need for translating this to something more coldfusion native.

Usage

<cfinvoke component="lab.cf.google.google" method="search" returnvariable="googleResults" >
  <cfinvokeargument name="q" value="uzilla"/>
  <cfinvokeargument name="start" value=1/>
  <cfinvokeargument name="maxResults" value="10"
  <cfinvokeargument name="key" value="...">
</cfinvoke>

The search method returns an array of structures with the following keys:

CACHEDSIZE
HOSTNAME
SNIPPET
SUMMARY
TITLE
URL

Change Notes

  • v0.3: Added ability to query for more than just 10 records. Note, for every 10 retrieved, you will use one of your 1000 daily allotted queries.

Source

google_cfc.zip

License

google.cfc is licensed under the Mozilla Public License. If you improve it, you are obligated to share your enhancements.

Future Work

Additional development might support more methods of the google api, optionally return a query instead of a struct. What else? Built-in caching?

Feedback to andyed(at)surfmind.com.

Sample Query: Top Twenty Results for "cold fusion blog" (with filter on)

Raymond Camden's ColdFusion Blog
Infuse - ColdFusion Blog
Forta.com - Blog
John Ramon - ColdFusion Blog - My Alternate Reality
coldfusionBloggers
Akbarsait's Blog
An Architect's View - ColdFusion, Software Design, Frameworks and ...
Pete Freitag
»» Coldfusion Blog - By Phil Porter ««
ColdFusion Blog Software
coldfusion blog software
Tech Blog - ColdFusion, LiveCycle ES, JAVA & Geek Food
Blog - AsFusion ActionScript + ColdFusion
indy:blog | Blog of Indiver Nagpal
Mango Blog
Daryl's ColdFusion Notes
Jamie Krug's ColdFusion Blog: "Does anyone have an opinion on ...
Quick ColdFusion Builder Extension Demo : Raymond Camden's ...
Stake Five :: coldfusion
Rob Brooks-Bilson's Blog: The Top ColdFusion Blog Posts of 2005