Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

currentsapi

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currentsapi

A node interface for News API from currentsapi.services

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
100
increased by1566.67%
Maintainers
1
Weekly downloads
 
Created
Source

currentsapi

A node interface for CurrentsAPI.

Latest news headlines and metadata in JSON from 13,000 popular news sites. Powered by Currents Api

In order to use this package you need to register at https://currentsapi.services/en/register

Please refer to our documentation to see details about how to use the API. The convenience functions provided by this module is simply passing your options along as querystring parameters to the REST API, so the documentation is totally valid.

There are some usage examples below to see how these options should be passed in.

If you use this in a project, kindly add an attribution : 'powered by Currents API' with links back to Currents Api.

Add to your project

$ npm i -s currentsapi

Test

$ API_KEY=<your api key> npm test

Example usage of API

All methods support promises and node-style callbacks.

const CurrentsAPI = require('currentsapi');
const currentsapi = new CurrentsAPI('YOUR_API_KEY');

// To query latest news
// All options passed to search are optional
currentsapi.search({
  keywords: 'Trump',
  language: 'en',
  country: 'US'
}).then(response => {
  console.log(response);
  /*
    {
      status: "ok",
      news: [...]
    }
  */
});


If you like this package you can follow us at [Twitter](https://twitter.com/currentsapi)

Keywords

FAQs

Package last updated on 02 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc