Tumblr

From rawveg/skillsforge-marketplace · View interactive version

Tumblr is an AI agent skill from the GitHub repository rawveg/skillsforge-marketplace. Tumblr API Development and Integration

How to use this skill

Skill file

Tumblr API Skill

Comprehensive assistance with Tumblr API development, authentication, and integration. This skill provides practical guidance for building applications that interact with Tumblr's platform.

When to Use This Skill

This skill should be triggered when:

Quick Reference

1. Fetch Blog Information

Retrieve basic blog metadata including title, description, and post count:

curl -H 'User-Agent: MyApp/1.0' \
  'https://api.tumblr.com/v2/blog/staff.tumblr.com/info?api_key=YOUR_API_KEY'

Response includes: Blog title, URL, post count, description, avatar, theme settings.

2. Get Recent Posts

Retrieve the 5 most recent posts from a blog:

curl -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  'https://api.tumblr.com/v2/blog/staff.tumblr.com/posts?limit=5'

Query parameters:

3. OAuth 2.0 Token Exchange

Exchange authorization code for access token:

curl -X POST https://api.tumblr.com/v2/oauth2/token \
  -F grant_type=authorization_code \
  -F code=YOUR_AUTH_CODE \
  -F client_id=YOUR_CONSUMER_KEY \
  -F client_secret=YOUR_CONSUMER_SECRET

Scopes: basic, write, offline_access

4. Get Blog Avatar

Fetch blog avatar image URL:

curl 'https://api.tumblr.com/v2/blog/staff.tumblr.com/avatar/128'

Available sizes: 16, 24, 30, 40, 48, 64, 96, 128, 512 (default: 64)

5. Retrieve Liked Posts

Get posts liked by a blog:

curl -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  'https://api.tumblr.com/v2/blog/staff.tumblr.com/likes?limit=20&offset=0'

Parameters: limit, offset, before (timestamp), after (timestamp)

6. Queue Management

Retrieve queued posts:

curl -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  'https://api.tumblr.com/v2/blog/myblog.tumblr.com/posts/queue'

Reorder queue:

curl -X POST https://api.tumblr.com/v2/blog/myblog.tumblr.com/posts/queue/reorder \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -d 'post_id=123456789'

7. Get Followers

Retrieve blog followers:

curl -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  'https://api.tumblr.com/v2/blog/myblog.tumblr.com/followers'

Response includes: Total follower count, follower blog objects with names and URLs.

8. Filter Posts by Tag

Retrieve posts with specific tag:

curl -H 'User-Agent: MyApp/1.0' \
  'https://api.tumblr.com/v2/blog/staff.tumblr.com/posts?api_key=YOUR_KEY&tag=photography&limit=10'

9. Standard API Response Format

All Tumblr API responses follow this structure:

{
  "meta": {
    "status": 200,
    "msg": "OK"
  },
  "response": {
    "blog": { },
    "posts": [ ]
  }
}

10. Working with Blog Identifiers

Three interchangeable identifier formats:

# Blog name
/v2/blog/staff/info

# Hostname
/v2/blog/staff.tumblr.com/info

# UUID (stable, persistent)
/v2/blog/t:0aY0xL2Fi1OFJg4YxpmegQ/info

Recommendation: Use UUID for long-term stability (survives blog renames).

Key Concepts

Authentication Levels

  1. None - Public endpoints (blog info, public posts) require no authentication
  2. API Key - Use OAuth Consumer Key as api_key query parameter
  3. OAuth - Signed requests using OAuth 1.0a or OAuth 2.0 for user-specific data

Rate Limits

Per IP Address:

Per Consumer Key:

Action Limits:

Post Formats

Legacy Post Types:

Neue Post Format (NPF):

Post IDs

Post IDs are 64-bit integers. Important: Use id_string field for JavaScript or languages with unsafe integer handling.

Required Headers

User-Agent: Mandatory for all requests. Must be consistent. Format: AppName/Version

Content-Type: Required for POST/PUT with body. Accepted:

Reference Files

This skill includes comprehensive documentation in references/:

Use the view command to read specific reference files when detailed information is needed.

Working with This Skill

For Beginners

  1. Start with public endpoints - No authentication needed:
  1. Register your application:
  1. Test with API Console:

For OAuth Implementation

  1. Choose OAuth version:
  1. OAuth 2.0 flow:
  1. OAuth 1.0a flow:

For Advanced Features

  1. Neue Post Format (NPF):
  1. Pagination:
  1. Partial responses:
  1. JSONP support:

Common Patterns

Authentication Flow (OAuth 2.0)

# Step 1: Redirect user to authorization URL
https://www.tumblr.com/oauth2/authorize?client_id={key}&response_type=code&scope=basic%20write&state={random}

# Step 2: User authorizes, Tumblr redirects back with code
# Your redirect URL receives: ?code={auth_code}

# Step 3: Exchange code for access token
curl -X POST https://api.tumblr.com/v2/oauth2/token \
  -F grant_type=authorization_code \
  -F code={auth_code} \
  -F client_id={consumer_key} \
  -F client_secret={consumer_secret}

# Step 4: Use access token in requests
curl -H 'Authorization: Bearer {access_token}' \
  'https://api.tumblr.com/v2/user/info'

Error Handling

{
  "meta": {
    "status": 401,
    "msg": "Unauthorized"
  },
  "response": [ ],
  "errors": [
    {
      "title": "Unauthorized",
      "code": 401,
      "detail": "OAuth authentication required"
    }
  ]
}

Common status codes:

Handling Large Post Counts

# Fetch all posts using pagination
offset=0
limit=20

while true; do
  curl "https://api.tumblr.com/v2/blog/staff.tumblr.com/posts?api_key={key}&limit=${limit}&offset=${offset}"
  offset=$((offset + limit))
  # Check if response contains fewer than 'limit' posts, then break
done

Resources

Official Links

Official Clients

Best Practices

  1. Always include User-Agent header - Inconsistent or missing User-Agent may result in suspension
  2. Respect rate limits - Implement exponential backoff for 429 responses
  3. Use UUIDs for blog identifiers - More stable than blog names (survive renames)
  4. Cache blog info - Reduce API calls by caching static blog data
  5. Use NPF for new integrations - Legacy formats may be deprecated
  6. Handle 64-bit integers carefully - Use id_string for JavaScript
  7. Validate responses - Check meta.status before processing response

Notes

Updating

To refresh this skill with updated documentation:

  1. Re-run the scraper with the same configuration
  2. The skill will be rebuilt with the latest information from the official GitHub repository
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.