google api for image search?

a question for the programmer-artists, if i may.

has anyone used the google api's to retrieve images from image search?

ja
http://vispo.com

Comments

, Barry Hoggard

On Jun 27, 2006, at 7:42 AM, Jim Andrews wrote:

> a question for the programmer-artists, if i may.
>
> has anyone used the google api's to retrieve images from image search?
>
> ja
> http://vispo.com


What language do you want to use? If it's in Perl, I would use this:

http://search.cpan.org/~grousse/WWW-Google-Images-0.6.2/

I'm sure there are modules for Java, PHP, etc. too.






Barry Hoggard
www.ArtCat.com -self-managed websites for artists/galleries
www.ArtCal.net - gallery/art guide
www.bloggy.com - weblog
AIM/Yahoo: hoggardb

, Steve OR Steven Read

The google search api doesn't include image search functionality, only web search. However, one can parse the google web search results for image tags. I use PHP with PEAR:SOAP package to do it, and its very fast. I have some html parsing code (in php) which does this. I would happy to share some of this code with others.

An example of this is here at my new site:
http://www.stevenread.signoi.com/photonoise

This site is still in dev/test, but the photo noise app and its code has been running strong every day for nearly 2 years (at stevenread.com)

I would be interested in hearing other ways that people have used the google apis for image capture???

-Steve

Barry Hoggard wrote:

> On Jun 27, 2006, at 7:42 AM, Jim Andrews wrote:
>
> > a question for the programmer-artists, if i may.
> >
> > has anyone used the google api's to retrieve images from image
> search?
> >
> > ja
> > http://vispo.com
>
>
> What language do you want to use? If it's in Perl, I would use this:
>
> http://search.cpan.org/~grousse/WWW-Google-Images-0.6.2/
>
> I'm sure there are modules for Java, PHP, etc. too.
>
>
>
>
>
> –
> Barry Hoggard
> www.ArtCat.com -self-managed websites for artists/galleries
> www.ArtCal.net - gallery/art guide
> www.bloggy.com - weblog
> AIM/Yahoo: hoggardb
>
>

, Jim Andrews

i have pretty much fixed the problem i was having; http://vispo.com/dbcinema is working again.

the problem was caused by google having changed the format of their html image search results. the old format still obtains if the request is not from inside a browser–as is the case with server-side processing and in, say, authoring or projector mode in director. but if the google query comes from a browser, the html image search results now are quite different than what they have been the last couple of years.

since, as you point out, there is no official google api for image search, part of what that means is that programs that use google image search are hacks, if part of the definition of 'hack' is code that gets a program to do something it was never intended to do. hacks are interesting precisely because they do the unexpected, but since they are not supported, they sometimes have a short life.

Patrick Tresset pointed out that Yahoo actually has provided an image search API: http://developer.yahoo.com/search/image/V1/imageSearch.html . In other words they support the notion of programmers using Yahoo image search. And with that support comes, presumably, a longer life for programs that use this published API.

I have fixed the dbcinema/google problem by re-writing the routine that parses the google image search html results, but i realize it's just a matter of time before i have to do that again. so i am going to use the yahoo api, make that the primary search apparatus of dbcinema, and use google as a secondary search engine; if google isn't working in dbcinema, dbcinema will still get images from yahoo.

i imagine that in the future, net art will routinely use many web services that have published api's and supply all sorts of services including text, image, sound, and video search, dictionaries, thesaurii, stock info, but also things like, oh, you send the service a sentence and the service sends back the sentence parsed into the parts of speech or sends back the sentence parsed semantically, in some sense–services that will allow us use AI in interesting ways. there is of course some of this going on now, as we see in the alice bot api. in general, there will be all sorts of (queriable) web service api's available that turn the idea of net art into something whereby we really do see interesting use of the global info databases toward an art of larger and other mind.

ja
http://vispo.com



> —–Original Message—–
> From: [email protected] [mailto:[email protected]]On Behalf Of
> Steve OR Steven Read
> Sent: June 29, 2006 12:08 PM
> To: [email protected]
> Subject: RHIZOME_RAW: Re: Re: google api for image search?
>
>
> The google search api doesn't include image search functionality,
> only web search. However, one can parse the google web search
> results for image tags. I use PHP with PEAR:SOAP package to do
> it, and its very fast. I have some html parsing code (in php)
> which does this. I would happy to share some of this code with others.
>
> An example of this is here at my new site:
> http://www.stevenread.signoi.com/photonoise
>
> This site is still in dev/test, but the photo noise app and its
> code has been running strong every day for nearly 2 years (at
> stevenread.com)
>
> I would be interested in hearing other ways that people have used
> the google apis for image capture???
>
> -Steve
>
> Barry Hoggard wrote:
>
> > On Jun 27, 2006, at 7:42 AM, Jim Andrews wrote:
> >
> > > a question for the programmer-artists, if i may.
> > >
> > > has anyone used the google api's to retrieve images from image
> > search?
> > >
> > > ja
> > > http://vispo.com
> >
> >
> > What language do you want to use? If it's in Perl, I would use this:
> >
> > http://search.cpan.org/~grousse/WWW-Google-Images-0.6.2/
> >
> > I'm sure there are modules for Java, PHP, etc. too.

, Steve OR Steven Read

That's exactly the problem with hacking around and not using the apis - the page interfaces change frequently and you lose the encapsulation benefits that an api provides. But the method I have employed is a compromise - it uses the api, and then hacks the api results instead of the interface. This was a good method for me anyways, and the code has run continually for a couple years without need for interface changes. On the flip side, if one does go around an api, interface changes to code are usually very minor and easy do quickly (but sometimes not!). And you might not know that its broken for a while unless you check it every day or setup an error notification module. And places like google track ips so if you are banging them hard you will be blocked. Hacking is good, doubtless I am not a code materialist, do it how you do it! …but when having to hack, choosing an ideal hacking method is part of the fun for me.

I have been wanting to try the yahoo image search api. Anybody out there use it?

, Jim Andrews

> I have been wanting to try the yahoo image search api. Anybody
> out there use it?

Yes, I am using the yahoo image search api (docs at http://developer.yahoo.com/search/image/V1/imageSearch.html ) now at http://vispo.com/dbcinema (as well as google). The things i don't like about it are the api does not let you specify image size, and you get only about 5000 queries per day per IP (though that should usually suffice because each query can return up to 50 images (i'm using 16 per query)). the things i like about it are it *is an api*; and it maxes out at 1500 images per query (rather than 1000 with google); and the parsing is very quick and simple because the results can be received in xml format.

currently, by default, when you do a dbcinema search, it first gets google results and then, after those have been displayed, displays yahoo results. though you can change that by changing the "Search Range" box accessible from the dbcinema toolbar.

common concepts return about 2500 images (google + yahoo).

ja
http://vispo.com

, Steve OR Steven Read

Cool. Based on what people have emailed and written here, it seems that yahoo has the better web/image searching api. Google only gives 1,000 queries per day and 1,000 hits per query, and they only have web search and its all remained this way for years. Very limited and sad, when considering the potential with their resources. As usual their services remain in beta for years on end while they go out and conquer new terrirory. I just can't wait for the new Google Schmoozle service, the new Google Diaper service, the upcoming Google Pizza, and the apocalyptic Google Dust-Bunny Search (all will remain in beta for 10 years of course). Either google has redefined the term 'beta' or they are the absolute worst at completing projects. For instance, they began Google Groups in about 2000, and its still beta. Why on google-earth would it still be in beta after 6 years? I guess this one especially bothers me because they acquired some of MY CODE in the acquisition of Deja which begat Groups. And since they obtained it, in beta it sits, no api, no enhancements, nada.

I'm spinning OT! Must stop, before, its ,too,,.. late.

, Jim Andrews

> Cool. Based on what people have emailed and written here, it
> seems that yahoo has the better web/image searching api. Google
> only gives 1,000 queries per day and 1,000 hits per query, and
> they only have web search and its all remained this way for
> years. Very limited and sad, when considering the potential with
> their resources. As usual their services remain in beta for years
> on end while they go out and conquer new terrirory. I just can't
> wait for the new Google Schmoozle service, the new Google Diaper
> service, the upcoming Google Pizza, and the apocalyptic Google
> Dust-Bunny Search (all will remain in beta for 10 years of
> course). Either google has redefined the term 'beta' or they are
> the absolute worst at completing projects. For instance, they
> began Google Groups in about 2000, and its still beta. Why on
> google-earth would it still be in beta after 6 years? I guess
> this one especially bothers me because they acquired some of MY
> CODE in the acquisition of Deja which begat!
> Groups. And since they obtained it, in beta it sits, no api, no
> enhancements, nada.

well, you can compare google and yahoo image search in dbcinema at http://vispo.com/dbcinema by clicking the 'dbcinema' logo twice and then making a selection in the 'Search Range' box; this allows you to select one of 'Google', 'Yahoo', 'GooYa', or 'YaGoo'.

at least in dbcinema, it's nice to be able to select image size, which you can't do with Yahoo. also, although Yahoo sometimes returns as many as 1500 images per query, my experience so far indicates that it often returns far fewer images than Google. For instance, Google returns 900+ images concerning 'Giordano Bruno' whereas Yahoo returns 28.

Also, the Google images, in my experience, often are overall more relevant than the Yahoo images. Which might indicate that the Google spiders are more intelligent and hard-working than the Yahoo spiders.

i'm not aware that google limits you to 1000 queries per day.

in a way i like google calling lots of their software 'beta'.

I never really liked Yahoo. Of course their name comes from Gulliver's Travels by Johnathan Swift; the Yahoos were disgusting creatures. Mind you, the Houynms were too.

If you're going to use image search in a piece, i recommend you keep the code general enough that you are not limited to using just one image search web service. They come and they go. But net art is forever ha.

ja
http://vispo.com