Skip to content

currentslab/currentsapi_nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

currentsapi

The official Node.js SDK for the Currents API.

Installation

npm install currentsapi

Usage

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:

  • keywords
  • language
  • country
  • category
  • start_date
  • end_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

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors