x-fran / g-trends

Google Trends API for PHP
https://tarlabs.es
MIT License
113 stars 47 forks source link

Why is the return value empty after I changed the time parameter? #30

Closed jzd16boof closed 4 years ago

jzd16boof commented 4 years ago

Hello, when I use the getRelatedSearchQueries method, as soon as I change the time, the return is empty. I read the GTrends.php file. The default time of the getRelatedSearchQueries method is today 12-m. Why as long as this time is modified, the return is empty.

rbnfsh commented 4 years ago

for me anything above 12-m i.e. 24-m or 2-y returns empty

jzd16boof commented 4 years ago

for me anything above 12-m i.e. 24-m or 2-y returns empty

I found a way to return the data correctly. Don’t use time like ‘today 12-m’ in this format, just use a time format like “2020-06-01 2020-06-21”.

rbnfsh commented 4 years ago

Thanks this worked