node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »


A Hubot-compatible Tumblr API wrapper for Node.js

Build Status


npm install tumblrbot


Use it in your Hubot script:

module.exports = (robot) ->
  tumblr = require('tumblrbot')(robot)

Or use it on its own:

tumblr = require('tumblrbot')


# Get the latest 3 posts 
tumblr.posts("").last 3(data) ->
  console.log post.title for post in data.posts

The following options are available to help you filter by post type: posts, text, quote, link, answer, video, audio, photo.

# Get the most recent video post"").last (data) ->
  console.log data.posts[0].title
# Or use the plural form (it's just an alias) 
tumblr.videos("").last (data) ->
  console.log data.posts[0].title
# Or get it without the array"").one (post) ->
  console.log post.title

You can pass any options specified in the Tumblr API:

tumblr.posts("").last 2{ tag: "potatoes" }(data) ->
  console.log post.title for post in data.posts

Get a random photo post:"").random (post) ->


If process.env.HUBOT_TUMBLR_API_KEY is present, you're automatically authenticated. Sweet!

Helpful Hubot

Hubot will log errors if a request fails.