Aptitude API is a free and open source API that generates aptitude questions based on your choice or randomly for each call. The topics that are currently available are : Mixture and Alligation , Profit and Loss , Pipes and Cisterns , Age , Permutation and Combination , Speed Time Distance , Simple Interest , Calendars. Each topic in this API contains 100+ questions.
https://github.com/thirukumaran05/Aptitude-API
fetch('url') .then(response => {
//handle response
console.log(response);
}) .then(data => {
//handle data
console.log(data);
}) .catch(error => {
//handle error
});
{
question: "The sum of ages of A and B is 45 years. If the ratio of
their ages is 5:3, what is B's age?",
answer: "18 years",
options: ["15 years", "18 years", "20 years", "25 years"],
explanation: "Let the ages of A and B be 5x and 3x, respectively.
Given that 5x + 3x = 45. Solving this equation gives x = 5. Hence,
B's age = 3 * 5 = 15 years."
}
Post Route : https://aptitude-api.vercel.app/[APTITUDE TOPIC]