qwant-api icon indicating copy to clipboard operation
qwant-api copied to clipboard

How to deal with error 24?

Open simoniz0r opened this issue 7 years ago • 5 comments

24	Rate limit reached - IP Blocked until captcha is solved

How do I solve this captcha? Is there some API endpoint for this or?

simoniz0r avatar Jan 14 '19 00:01 simoniz0r

@simoniz0r Did you ever find a solution for this? If you wait a day or two can you use the api again?

Edit: Answering this myself... if you visit qwant.com and do a search it prompts you for a captcha.

geoffyuen avatar Feb 16 '19 21:02 geoffyuen

You can check the line in the code: https://github.com/NLDev/qwant-api/blob/master/lib/qwant-api.js#L52 and replace:

https://api.qwant.com/api/search/${keyword}?count=${count}&q=${query}&t=${query}&f=&offset=${offset}&locale=${lang}&uiv=4

with

http://api.scraperapi.com/?api_key=YOURAPIKEY&url=https://api.qwant.com/api/search/${keyword}?count=${count}&q=${query}&t=${query}&f=&offset=${offset}&locale=${lang}&uiv=4

You can register with scraperapi on the link below to bypass all the captcha issue (make sure you replace YOURAPIKEY with the api key you register with scraperapi.

There is a free version with 1000 calls per month or you can use the paid version: https://www.scraperapi.com/pricing?fp_ref=n_o_kh

n-o-kh avatar Aug 08 '19 09:08 n-o-kh

I've found a similar solution, but with 10,000 free uses per month at https://scrapestack.com

simoniz0r avatar Dec 23 '19 23:12 simoniz0r

Is the ratelimit known?

polyjitter avatar Mar 24 '20 00:03 polyjitter

I've found a similar solution, but with 10,000 free uses per month at https://scrapestack.com

They now do not provide free HTTPS

HQuser avatar Jul 01 '20 08:07 HQuser