Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including akismet with all npm packages installed. Try it out:

var akismet = require("akismet")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

akismet v1.0.0

Akismet API client for node.js

An Akismet API client for node.js.

NPM version License


npm install akismet


You need to sign up for an Akismet API key to use the API. Once you sign up, it would be a good idea to verify your key.

var akismet = require('akismet').client({ blog: '', apiKey: 'myakismetapikey123' });

akismet.verifyKey(function(err, verified) {
  if (verified) 
    console.log('API key successfully verified.');
    console.log('Unable to verify API key.');

You can now use Akismet to moderate your comments.

    user_ip: '', 
    permalink: '',
    comment_author: 'spammer',
    comment_content: 'spamming your comments'
  }, function(err, spam) {
      console.log('Spam caught.');
      console.log('Not spam');

You can also send feedback to Akismet with submitSpam and submitHam. Their usage is the same as checkSpam.

    user_ip: '', 
    permalink: '',
    comment_author: 'spammer',
    comment_content: 'that was spam but you failed to catch me'
  }, function(err) {
    console.log('Spam reported to Akismet.');

See the Akismet API documentation for more information.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free