G Trends
A simple API client for Google Trends.
Quick Start
npm install g-trends
Super simple to use
G Trends client is designed to be the simplest way for developers to access Google Trends data.
const ExploreTrendRequest = const explorer = explorer
[✔] Done, take a look at your beautiful CSV formatted data![ [ 'Day', 'Dream about snakes: (Worldwide)', 'Dream about falling: (Worldwide)' ], [ '2017-09-29', '26', '58' ], [ '2017-09-30', '68', '88' ], [ '2017-10-01', '57', '100' ], [ '2017-10-02', '72', '60' ], [ '2017-10-03', '65', '70' ], [ '2017-10-04', '35', '55' ], [ '2017-10-05', '55', '58' ], [ '2017-10-06', '34', '80' ], [ '2017-10-07', '66', '69' ], ...
ExploreTrendRequest
Method Listing
normalize()
the normalize
method give you a quick way to overwrite the default normalization function and process the raw Google Trends data before it resolved.
const explorer = explorer
searchProvider()
The searchProvider
method allow you to choose the search provider you wise to extract data from.
const ExploreTrendRequestSearchProviders = const explorer = // SearchProviders.News, SearchProviders.Web, SearchProviders.YouTube// SearchProviders.GoogleImages, SearchProviders.GoogleShopping explorer
addKeyword()
The addKeyword
method appends a given keywords to the trend exploration request.
const explorer = explorer
between()
The between
method allows you to extract trend data for a given time period.
const explorer = explorer
pastHour()
The pastHour
method allows you to extract trend data for a the past hour.
explorer
pastFourHours()
The pastFourHours
method allows you to extract trend data for a the past 4 hours.
explorer
pastDay()
The pastDay
method allows you to extract trend data for a the past day.
explorer
past7Days()
The past7Days
method allows you to extract trend data for a the past 7 days.
explorer
past30Days()
The past30Days
method allows you to extract trend data for a the past 30 days.
explorer
past90Days()
The past90Days
method allows you to extract trend data for a the past 90 days.
explorer
past12Months()
The past12Months
method allows you to extract trend data for a the past 12 months.
explorer
past5Years()
The past5Years
method allows you to extract trend data for a the past 5 years.
explorer
from2004ToPresent()
The from2004ToPresent
method allows you to extract trend data from 2004 to the present.
explorer