Skip to main content

Forum API Guide

The client.forum service allows applications to browse MyAnimeList forum categories, sub-boards, active discussion threads, and post comments.

API Reference

These methods interact with the official MyAnimeList Forum Endpoints.

Fetching Forum Boards & Categories​

Retrieve the list of forum categories and sub-boards using getForumBoards:

val forumBoards = client.forum.getForumBoards()

forumBoards.categories.forEach { category ->
println("Category: ${category.title}")
category.boards.forEach { board ->
println(" Board #${board.id}: ${board.title} - ${board.description}")
}
}

Searching & Querying Forum Topics​

Search for forum topics by keyword or filter by board ID:

val topics = client.forum.getForumTopics(
query = "Spring 2024 Anime",
limit = 10,
offset = 0
)

topics.data.forEach { topic ->
println("Topic #${topic.id}: ${topic.title} by ${topic.createdBy.name}")
println(" Posts: ${topic.numberOfPosts}, Last Post: ${topic.lastPostCreatedAt}")
}

Fetching Topic Discussion Posts​

Fetch a topic thread along with its posts and comments using getForumTopicDetail:

val topicDetail = client.forum.getForumTopicDetail(
topicId = 123456,
limit = 20,
offset = 0
)

println("Topic Title: ${topicDetail.data.title}")
println("Total Posts: ${topicDetail.data.posts.size}")

topicDetail.data.posts.forEach { post ->
println("${post.createdBy.name} at ${post.createdAt}:")
println(post.body)
}