An API to get the search trends data of given word(s) in the range
of one year.
You can have the search data of max 5 words at a
time.
Copy the below code and paste it between the <script></script> tag in body or in a JS file or in a node environment.
(async function getTrends() {
const word = {
word: ["some", "words"], // example
};
const arg = {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(word),
};
const res = await fetch("https://outdated-trends.outdatedguy.rocks/trends", arg);
const data = await res.json();
console.log(data);
})();
Now change the words of word.word array to your liking.
Expected output for array of 3 words is like:
the word property must be an array of strings.
Maximum array length should be 5
1. Response contains 3 properties: xAxis, yAxis and
average. For data of a single word, average is an empty
array.
2. xAxis is an array of length 52 to
represent weeks in range of a year.
3.
yAxis is an 2d array of length 52 with values respective
to the sequence of words given.
4. average is
an array of length 2-5 having values of comparison with
other words over the year.