Similarweb-free-API icon indicating copy to clipboard operation
Similarweb-free-API copied to clipboard

Getting 403 when calling via Python

Open Julia288 opened this issue 4 years ago • 7 comments

Hey! Thanks a lot for your contribution. I am getting 403 when calling the URL via python, but it works when using the browser. Do you have any idea how to deal with this? Best, Julia

Julia288 avatar Jan 11 '22 10:01 Julia288

Yeah, I got the same issue with Julia. Did the api ask for a free api-key? Anyway, thank you for offering this free api example!

pokrpokr avatar Jan 14 '22 06:01 pokrpokr

Yeah, I got the same issue with Julia. Did the api ask for a free api-key? Anyway, thank you for offering this free api example!

The only way to make this work is to send a request via Selenium / Puppeteer. Only a real browser can get a response. Other solutions like CLI cURL, PHP cURL, etc. won't work.

infinitum11 avatar Apr 24 '22 13:04 infinitum11

It is enough to change the headers when you call it from python ;).

Bender250 avatar Jul 25 '23 12:07 Bender250