Google Image Search API using Python

383 views
Skip to first unread message

dmitry...@gmail.com

unread,
Dec 2, 2015, 8:48:59 AM12/2/15
to Google AJAX APIs
Hello, I try write your an example code for work with Google Image Search API using Python and get an error: {'responseStatus': 403, 'responseData': None, 'responseDetails': 'This API is no longer available.'}

My code:
import urllib.request
import simplejson

url
= ('https://ajax.googleapis.com/ajax/services/search/images?' +
           
'v=1.0&q=barack%20obama&userip=93.171.159.170')

    req
= urllib.request.Request(url, None, {'Referer': 'easy-css.ru'})
    response
= urllib.request.urlopen(req)

   
# Process the JSON string.
    result
= simplejson.load(response)

Please help me, where is my mistake?

Jeremy Geerdes

unread,
Dec 2, 2015, 8:50:11 AM12/2/15
to google-ajax...@googlegroups.com

It would seem that Google is finally cleaning house of deprecated services. Take the response at face value: the Image Search API is gone.

JG

--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/0ebe4d4f-44a2-4a24-9fa6-3bd2bccf8ce3%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages