Danbooru Anime API

Anime / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

Overview

Danbooru is a large anime image board with a structured tagging system covering thousands of anime artists and characters. Beginners can use it to explore anime artwork and search images by character, series, or artist tags. Its API lets you query image metadata, tags, and artist records programmatically.

💡

Beginner Tip

You need a free account and API key for most endpoints; anonymous requests are rate-limited to 2 requests/second. Start with GET /posts.json?tags=<character_name> to search by character.

Available Data

track name and artist
album metadata
audio preview URLs
popularity score
genre classification
anime/manga title

Example Response

JSON Response
{
  "name": "Bohemian Rhapsody",
  "artist": "Queen",
  "album": "A Night at the Opera",
  "duration_ms": 354000,
  "popularity": 92,
  "preview_url": "https://p.scdn.co/mp3-preview/..."
}

Field Reference

id Unique post identifier on Danbooru.
tag_string Space-separated list of all tags applied to the post.
file_url Direct URL to the full-resolution image file.
preview_file_url URL to the small thumbnail preview of the image.
rating Content rating: g (general), s (sensitive), q (questionable), e (explicit).
score Community upvote score for the post.

Implementation Example

const url = "https://danbooru.donmai.us/wiki_pages/help:api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing or incorrect API key in the Authorization header.
Pass your credentials as Basic Auth: -u username:api_key in curl.
422 Unprocessable Entity Invalid tag syntax or too many tags in a single query (limit is 2 tags for free accounts).
Reduce the number of tags or upgrade to a Gold account for more tag slots.
429 Too Many Requests Exceeded the rate limit (2 req/s anonymous, 10 req/s with key).
Add a delay between requests or authenticate to get a higher limit.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Anime
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →