This API provides the Current Affairs of India and International News and daily quizzes for practicing your skills on current affairs.
- International current affairs
- India’s current affairs
- Quiz for today
- Today in Indian History
- Current affair for any day ( dev )
npm install
Endpoints:
- /international-today
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://current-affairs-of-india.p.rapidapi.com/international-today',
headers: {
'X-RapidAPI-Key': 'your-rapidapi-key',
'X-RapidAPI-Host': 'current-affairs-of-india.p.rapidapi.com'
}
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
}
- /recent
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://current-affairs-of-india.p.rapidapi.com/recent',
headers: {
'X-RapidAPI-Key': 'your-rapidapi-key',
'X-RapidAPI-Host': 'current-affairs-of-india.p.rapidapi.com'
}
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
}
- /today-quiz
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://current-affairs-of-india.p.rapidapi.com/today-quiz',
headers: {
'X-RapidAPI-Key': 'your-rapidapi-key',
'X-RapidAPI-Host': 'current-affairs-of-india.p.rapidapi.com'
}
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
}
- /history-of-today
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://current-affairs-of-india.p.rapidapi.com/history-of-today',
headers: {
'X-RapidAPI-Key': 'your-rapidapi-key',
'X-RapidAPI-Host': 'current-affairs-of-india.p.rapidapi.com'
}
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
}