currentsapi
v0.2.1
Published
Official Node.js client for the Currents API
Downloads
1,058
Maintainers
Readme
currentsapi
The official Node.js SDK for the Currents API.
Installation
npm install currentsapiUsage
const CurrentsAPI = require('currentsapi');
const api = new CurrentsAPI('YOUR_API_KEY');Endpoints
Latest News
api.latestNews({ language: 'en' })
.then(response => console.log(response));Search
api.search({ keywords: 'OpenAI', language: 'en' })
.then(response => console.log(response));Supported parameters:
keywordslanguagecountrycategorystart_dateend_date
Available Resources
api.availableLanguages();
api.availableRegions();
api.availableCategory();Authentication
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.
License
MIT
