Closed Howon closed 7 years ago
I just got this error also
I think it's happening for all requests. I logged the request it makes and response it gets.
Request:
{ host: 'www.google.com', method: 'GET', path: '/trends/api/explore?hl=en-US&req=%7B%22comparisonItem%22%3A%5B%7B%22keyword%22%3A%22Women\'s%20march%22%2C%22hl%22%3A%22en-US%22%2C%22endTime%22%3A%222017-02-20T05%3A59%3A05.033Z%22%2C%22startTime%22%3A%222004-01-01T00%3A00%3A00.000Z%22%2C%22time%22%3A%222004-01-1%202017-02-20%22%7D%5D%2C%22cat%22%3A0%7D&tz=300' }
Response:
<HTML><HEAD><meta` http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="https://trends.google.com/trends/api/explore?hl=en-US&req=%7B%22comparisonItem%22%3A%5B%7B%22keyword%22%3A%22Women's%20march%22%2C%22hl%22%3A%22en-US%22%2C%22endTime%22%3A%222017-02-20T05%3A59%3A05.033Z%22%2C%22startTime%22%3A%222004-01-01T00%3A00%3A00.000Z%22%2C%22time%22%3A%222004-01-1%202017-02-20%22%7D%5D%2C%22cat%22%3A0%7D&tz=300">here</A>.
</BODY></HTML>
Weird because if you GET: www.google.com/trends/api/explore?hl=en-US&req=%7B%22comparisonItem%22%3A%5B%7B%22keyword%22%3A%22Women\'s%20march%22%2C%22hl%22%3A%22en-US%22%2C%22endTime%22%3A%222017-02-20T05%3A59%3A05.033Z%22%2C%22startTime%22%3A%222004-01-01T00%3A00%3A00.000Z%22%2C%22time%22%3A%222004-01-1%202017-02-20%22%7D%5D%2C%22cat%22%3A0%7D&tz=300 in Postman it returns the JSON.
Right. I was wondering about the same thing
@Howon @CosmicWebServices @turnerniles looks like the url changed, hopefully this PR #51 fixes it
When I run
This happens.
The endpoint is probably wrong or something. Has anyone used this successfully?