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

diffbot

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diffbot

Node.js wrapper for the Diffbot Article and Frontpage APIs

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-diffbot

node-diffbot is a wrapper for the Diffbot API. It only supports the Article and Frontpage APIs as of right now.

Install

npm install diffbot

Example

var Diffbot = require('diffbot').Diffbot

var diffbot = new Diffbot('d7bde3fafe30213a331b0f0e65d89b0f'); // your API key here

// regular function
diffbot.article({uri: 'http://techcrunch.com/2011/09/07/nintendo-gets-sued-over-the-wii/'}, function(err, response) {
  console.log(response.title);
  console.log(response.text);
  if (response.media)
    console.log(JSON.stringify(response.media));
});

// and a dash of cayenne... some addins
diffbot.article({uri: 'http://www.vanityfair.com/business/features/2011/04/jack-dorsey-201104', html: true, comments: true, stats: true}, function(err, response) {
  console.log(response.stats.fetchTime);
  console.log(response.stats.confidence);
  console.log(response.html);
});

// maybe try the frontpage api too
diffbot.frontpage({uri: 'http://prettyspace.tumblr.com/'}, function(err, response) {
  // the frontpage api is weird right now
  // the json return isn't really json...
  // it looks like xml converted to json
  // need to incorporate an xml parser to this
});

Keywords

FAQs

Package last updated on 18 Dec 2015

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