pygoogle icon indicating copy to clipboard operation
pygoogle copied to clipboard

Error: "The Google Web Search API is no longer available"

Open wkevils opened this issue 8 years ago • 3 comments

Running the script in the example: from pygoogle import pygoogle g = pygoogle('quake 3 arena') g.pages = 5 print 'Found %s results'%(g.get_result_count()) Gives the following error: pygoogle ERROR search| responseDetails : The Google Web Search API is no longer available. Please migrate to the Google Custom Search API (https://developers.google.com/custom-search/) Found 0 results

wkevils avatar Jun 03 '16 17:06 wkevils

It seems like the Ajax api used in the module is deprecated. I am little busy now and I can migrate it to the new api in sometime. PR's are gladly welcome in the meanwhile. :)

r-nikhil avatar Jun 05 '16 13:06 r-nikhil

I think the API to be migrated to is https://developers.google.com/custom-search/json-api/v1/overview#data_format

The current version of the module does not need an API key for working because the Ajax api was free and unlimited to everyone.

This new custom search API has a limit on number of requests per day (around 100) making this useless to be used in production unless the developer buys the paid version and changes the API key accordingly.

Also, if a new developer wants to use the updated module, he/she has to first create a custom search engine in the Google developer console, then obtain the API key from there.

All this makes it too cumbersome and pointless for the module which was supposed to help you search google from the command line easily without worrying about other things.

r-nikhil avatar Jun 08 '16 15:06 r-nikhil

How to use this api please help me.

al-hassan-cse avatar Jul 18 '18 05:07 al-hassan-cse