pytrends
pytrends copied to clipboard
API returns data but at same time raises 400
When I invoke get_historical_interest the api returns the data, but the request itself yields a 400. Here's the code.
pytrend = TrendReq(timeout=(10,25), retries=2, backoff_factor=0.1, tz=0)
kw_list = ["Bitcoin", "BTC"]
historicaldf = pytrend.get_historical_interest(
kw_list,
year_start=2022,
month_start=6,
day_start=24,
hour_start=0,
year_end=2022,
month_end=6,
day_end=24,
hour_end=13,
cat=0,
geo='',
gprop='',
sleep=10)
Output:
The request failed: Google returned a response with code 400
However, the data I receive. What is the issue here?
I get the same problem. Have you fixed that?