Today we’ve been using the Google Custom Search API Explorer to generate some sample search results for images, videos, presentations and Flash movies.
This is a very effective tool and allows us to filter our searches by many parameters, inclusing file format and site or domains. Images are handled differently to the others and generates a different JSON data structure, which is more detailed than the non-image search results.
We will now parse data from these sample JSON files to test how further meta- and paradata can be retrieved from relevant fileshare sites via their respective APIs. For example, taking the contextLink element from the raw Google result given in the JSON code below, we are able to use the Flickr API and gather much richer data for this image resource.
{
"kind": "customsearch#result",
"title": "Bessemer converter (iron into steel), Allegheny Ludlum Steel[e ...",
"htmlTitle": "Bessemer converter (iron into <b>steel</b>), Allegheny Ludlum <b>Steel</b>[e <b>...</b>",
"link": "http://farm3.staticflickr.com/2044/2178430515_d88779d275_z.jpg?zz=1",
"displayLink": "www.flickr.com",
"snippet": "Allegheny Ludlum Steel[e]",
"htmlSnippet": "Allegheny Ludlum <b>Steel</b>[e]",
"mime": "image/jpeg",
"image": {
"contextLink": "http://www.flickr.com/photos/library_of_congress/2178430515/",
"height": 640,
"width": 514,
"byteSize": 86844,
"thumbnailLink": "https://encrypted-tbn0.google.com/images?q=tbn:ANd9GcSAagY291GS5YPUBXpiCybbtHPIrz72Px_33MKwvZRg1ijeIymmqL3p15oo",
"thumbnailHeight": 137,
"thumbnailWidth": 110
}
Have a look to see how this example appears in our Flickr API test page.






