The official Node.js SDK for the Currents API.
npm install currentsapiconst CurrentsAPI = require('currentsapi');
const api = new CurrentsAPI('YOUR_API_KEY');api.latestNews({ language: 'en' })
.then(response => console.log(response));api.search({ keywords: 'OpenAI', language: 'en' })
.then(response => console.log(response));Supported parameters:
keywordslanguagecountrycategorystart_dateend_date
api.availableLanguages();
api.availableRegions();
api.availableCategory();All requests are authenticated using an Authorization header. Pass your API key when instantiating the client:
const api = new CurrentsAPI('YOUR_API_KEY');Get your API key at https://currentsapi.services/en/register.
MIT