@shaivpidadi/trends-js
Version:
Google Trends API for Node.js
40 lines (39 loc) • 1.45 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GOOGLE_TRENDS_MAPPER = void 0;
const enums_1 = require("./types/enums");
const GOOGLE_TRENDS_BASE_URL = 'trends.google.com';
exports.GOOGLE_TRENDS_MAPPER = {
[enums_1.GoogleTrendsEndpoints.dailyTrends]: {
path: '/_/TrendsUi/data/batchexecute',
method: 'POST',
host: GOOGLE_TRENDS_BASE_URL,
url: `https://${GOOGLE_TRENDS_BASE_URL}/_/TrendsUi/data/batchexecute`,
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
},
[enums_1.GoogleTrendsEndpoints.autocomplete]: {
path: '/trends/api/autocomplete',
method: 'GET',
host: GOOGLE_TRENDS_BASE_URL,
url: `https://${GOOGLE_TRENDS_BASE_URL}/trends/api/autocomplete`,
headers: {
accept: 'application/json, text/plain, */*',
},
},
[enums_1.GoogleTrendsEndpoints.explore]: {
path: '/trends/api/explore',
method: 'POST',
host: GOOGLE_TRENDS_BASE_URL,
url: `https://${GOOGLE_TRENDS_BASE_URL}/trends/api/explore`,
headers: {},
},
[enums_1.GoogleTrendsEndpoints.interestByRegion]: {
path: '/trends/api/widgetdata/comparedgeo',
method: 'GET',
host: GOOGLE_TRENDS_BASE_URL,
url: `https://${GOOGLE_TRENDS_BASE_URL}/trends/api/widgetdata/comparedgeo`,
headers: {},
},
};