Skip to content

Public NodeJS server for retriving data from Google Trends without cors restrictions

License

Notifications You must be signed in to change notification settings

Styro457/google-trends-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icon

Google Trends API Server

Public NodeJS Server used to retrive google trends data directly on client-side in order to avoid cors restrictions
using the google-trends-api package

Hosten on Heroku

  • Recommended mainly for small projects

How to use

As of right now, the only avaliable endpoint is /average-word-search
I plan on adding different ones in the future as well as parameters for all of them

/average-word-search

Returns the number of daily average searches for a word worldwide from 2016-01-01 until the present

Syntax:

https://google-trends-average.herokuapp.com/average-word-search/{word}

Example:

const word = "apple";
fetch("https://google-trends-average.herokuapp.com/average-word-search/" + word).then(response => {
  return response.json();
}).then(data => {
  console.log("Average searches for the word apple:" + data);
})
Average searches for the word apple: 44.12048192771084