What type of API does Tumblr provide?
Tumblr provides a REST API. The API uses standard HTTP methods and is organized around resources. All API requests start with https://api.tumblr.com
. Responses are returned in JSON format. The API supports OAuth 1.0a and OAuth 2.0 for authentication. Tumblr also offers an oEmbed API endpoint for embedding content, but the core API functionality follows REST principles.
Does the Tumblr API have webhooks?
No Official Webhooks in Tumblr API
The official Tumblr API does not have native webhook functionality. The API documentation does not mention any webhook features or endpoints for subscribing to events.
Discord Webhook Integration
Tumblr offers an experimental feature to send blog activity events to Discord via webhooks. This is enabled through Tumblr Labs on the web interface.
Events Available for Discord Webhooks
The Discord webhook integration allows subscribing to the following types of Tumblr events:
- New public published posts
- Reblogs
- New followers
- New reblogs of your blog's posts
- New asks
- Other blog activity events
Key Considerations
- The Discord webhook feature is experimental and only available through Tumblr Labs on the web interface.
- It's not part of the official API, so developers can't directly implement this in their applications.
- The events sent to Discord may include private information, so users should be cautious about who has access to the Discord server receiving the webhooks.
Official API Capabilities
While webhooks are not available, the official Tumblr API does provide other methods for retrieving blog data and activity:
- Retrieving blog info, posts, followers, etc.
- Getting a user's dashboard, likes, following list, etc.
- Creating, editing, and deleting posts
- Liking and unliking posts
In summary, the official Tumblr API does not offer webhook functionality. The closest feature is the experimental Discord webhook integration, but this is not part of the API and is limited to sending events to Discord servers.
Rate Limits and other limitations
Here are the key points about the API rate limits for the Tumblr API:
General Rate Limits
- 300 API calls per minute, per IP address
- 18,000 API calls per hour, per IP address
- 432,000 API calls per day, per IP address
- 1,000 API calls per hour, per consumer key
- 5,000 API calls per day, per consumer key
Action-Specific Limits (per day, per user)
- 250 new published posts (including reblogs)
- 250 images uploaded
- 200 follows
- 1,000 likes
- 10 new blogs created
- 20 videos uploaded
- 60 minutes of total video uploaded
Other Limits
- A blog can only follow 5,000 other blogs at a time
- A blog can only have 1,000 queued posts at a time
- You can only filter up to 1,000 tags at a time
Key Points
- Rate limits are based on Tumblr's internal clocks and reset daily
- Exceeding limits results in a 429 "Limit Exceeded" response
- The error message or headers will indicate which specific limit was hit
- Developers can request increased/removed rate limits for their app by contacting Tumblr
Best Practices
- Monitor API usage to stay within limits
- Implement backoff/retry logic to handle rate limit errors gracefully
- Consider caching data where possible to reduce API calls
- Request higher limits if needed for your application's use case
The rate limits are designed to prevent abuse while still allowing reasonable usage for most applications. Developers should be aware of these limits and design their apps accordingly.
Latest API Version
As of my knowledge cutoff in 2023, Tumblr has made significant changes to its API structure and versioning. Here's the most up-to-date information I can provide:
Current API Version
The most recent version of the Tumblr API is v2. This version has been in use for several years and remains the primary API for interacting with Tumblr's platform.
Key Points to Consider
- Tumblr API v2 is RESTful and uses OAuth for authentication.
- The API allows developers to read and write Tumblr data, including posts, blogs, and user information.
- Tumblr occasionally updates the v2 API with new features and endpoints, but the version number remains the same.
API Access and Documentation
To use the Tumblr API:
- Register your application on the Tumblr developer website to obtain API keys.
- Familiarize yourself with the API documentation, which is regularly updated.
- Use OAuth 1.0a for authentication in your API requests.
Best Practices
- Always check the official Tumblr API documentation for the most recent updates and changes.
- Be aware of rate limits and implement proper error handling in your applications.
- Keep your API keys secure and never expose them in client-side code.
It's important to note that while the API version remains v2, Tumblr may introduce new features or deprecate old ones within this version. Always refer to the official Tumblr API documentation for the most current information on endpoints, features, and best practices.
How to get a Tumblr developer account and API Keys?
To get a developer account for Tumblr and create an API integration, follow these steps:
-
Create a Tumblr account at https://www.tumblr.com/ if you don't have one.
-
Visit the Tumblr API Console at https://www.tumblr.com/oauth/apps. Log in if prompted.
-
Click on "Register a new application" or "Create a new app."
-
Fill out the application details:
- Application name
- Application website
- Application description
- Default callback URL (for OAuth)
-
Read and accept Tumblr's API License Agreement and Terms of Service.
-
Submit your application for review.
-
Once approved, you'll receive your API credentials:
- OAuth Consumer Key
- OAuth Consumer Secret
These credentials are essential for authenticating your API requests to Tumblr.
What can you do with the Tumblr API?
To answer your question about the data models you can interact with using the Tumblr API, I'll provide a list of the main data models and what's possible for each. Here's an overview:
Blog
- Retrieve blog information (title, description, avatar, etc.)
- Get blog posts
- Get blog followers
- Get blog likes
- Get blog queue
- Get blog drafts
- Submit posts to a blog
- Edit blog posts
- Delete blog posts
- Reorder blog queue
Post
- Create new posts (text, photo, quote, link, chat, audio, video)
- Edit existing posts
- Delete posts
- Reblog posts
- Like/unlike posts
- Get notes on a post
- Filter posts by type
- Get posts with specific tags
User
- Get user information
- Get user's likes
- Get user's following list
- Follow/unfollow blogs
- Like/unlike posts
Tag
- Search for posts with specific tags
- Get trending tags
Notes
- Retrieve notes for a specific post (likes, reblogs, replies)
Messaging
- Send fan mail
- Send asks (questions to blogs)
Dashboard
- Retrieve the user's dashboard feed
Notifications
Themes
- Get blog theme information
Analytics
- Retrieve blog statistics and analytics data
OAuth
- Authenticate users and obtain access tokens
Each of these data models allows for various interactions and operations through the Tumblr API. The specific endpoints and methods available may vary depending on the API version you're using, so it's always a good idea to consult the official Tumblr API documentation for the most up-to-date and detailed information on what's possible with each data model.