Skip to main content

Overview

The Anime Theme resource represents opening (OP), ending (ED), and insert (IN) songs for anime. Each theme is associated with an anime, song, and may have a group.

List Anime Themes

GET
endpoint
/api/animetheme
Retrieve a paginated list of anime themes.

Query Parameters

page[size]
integer
Number of results per page (default: 15, max: 100)
page[number]
integer
Page number to retrieve
include
string
Comma-separated list of relationships to include. Available includes:
  • anime - Parent anime
  • anime.images - Anime images
  • song - Associated song
  • song.artists - Song artists
  • song.performances - Song performances
  • song.performances.artist - Performance artists
  • group - Theme group (if applicable)
  • animethemeentries - Theme entries
  • animethemeentries.videos - Videos for each entry
  • animethemeentries.videos.audio - Audio tracks
filter[type]
string
Filter by theme type. Values: OP, ED, IN
filter[sequence]
integer
Filter by sequence number
filter[anime_id]
integer
Filter by anime ID
filter[song_id]
integer
Filter by song ID
fields[animetheme]
string
Comma-separated list of fields to return. Available fields:
  • theme_id
  • anime_id
  • song_id
  • group_id
  • type
  • sequence
  • slug
sort
string
Sort by field. Prefix with - for descending order. Available: type, sequence, created_at, updated_at
q
string
Full-text search query across themes, anime names, and song titles

Response

animethemes
array
Array of anime theme objects
theme_id
integer
Unique identifier
anime_id
integer
Parent anime ID
song_id
integer
Associated song ID
group_id
integer
Theme group ID
type
string
Theme type (OP, ED, IN)
sequence
integer
Sequence number for multiple OPs/EDs
slug
string
Generated slug (e.g., “OP1”, “ED2”)
created_at
string
ISO 8601 timestamp
updated_at
string
ISO 8601 timestamp

Example Request

curl "https://api.animethemes.moe/api/animetheme?include=anime,song.artists&filter[type]=OP&page[size]=10"

Example Response

{
  "animethemes": [
    {
      "theme_id": 1,
      "anime_id": 1,
      "song_id": 1,
      "group_id": null,
      "type": "OP",
      "sequence": 1,
      "slug": "OP1",
      "created_at": "2024-01-15T12:00:00.000000Z",
      "updated_at": "2024-01-15T12:00:00.000000Z",
      "anime": {
        "anime_id": 1,
        "name": "Cowboy Bebop",
        "slug": "cowboy_bebop",
        "year": 1998,
        "season": "Spring"
      },
      "song": {
        "song_id": 1,
        "title": "Tank!",
        "title_native": null,
        "artists": [
          {
            "artist_id": 1,
            "name": "The Seatbelts",
            "slug": "the_seatbelts"
          }
        ]
      }
    }
  ],
  "links": {
    "first": "https://api.animethemes.moe/api/animetheme?page[number]=1",
    "next": "https://api.animethemes.moe/api/animetheme?page[number]=2"
  },
  "meta": {
    "current_page": 1,
    "per_page": 10
  }
}

Show Anime Theme

GET
endpoint
/api/animetheme/:id
Retrieve a single anime theme by its ID.

Path Parameters

id
integer
required
The theme ID

Query Parameters

include
string
Same includes as list endpoint

Example Request

curl "https://api.animethemes.moe/api/animetheme/1?include=anime,song.artists,animethemeentries.videos"

Example Response

{
  "animetheme": {
    "theme_id": 1,
    "anime_id": 1,
    "song_id": 1,
    "type": "OP",
    "sequence": 1,
    "slug": "OP1",
    "anime": {
      "anime_id": 1,
      "name": "Cowboy Bebop",
      "slug": "cowboy_bebop"
    },
    "song": {
      "song_id": 1,
      "title": "Tank!",
      "artists": [
        {
          "artist_id": 1,
          "name": "The Seatbelts"
        }
      ]
    },
    "animethemeentries": [
      {
        "entry_id": 1,
        "version": 1,
        "episodes": "1-26",
        "videos": [
          {
            "video_id": 1,
            "basename": "CowboyBebop-OP1.webm",
            "resolution": 1080,
            "source": "BD"
          }
        ]
      }
    ]
  }
}

Create Anime Theme

POST
endpoint
/api/animetheme
Create a new anime theme. Requires authentication.

Request Body

anime_id
integer
required
Parent anime ID
type
string
required
Theme type (OP, ED, IN)
sequence
integer
Sequence number
song_id
integer
Associated song ID
group_id
integer
Theme group ID

Update Anime Theme

PUT
endpoint
/api/animetheme/:id
Update an existing anime theme. Requires authentication.

Delete Anime Theme

DELETE
endpoint
/api/animetheme/:id
Soft delete an anime theme. Requires authentication.

Restore Anime Theme

PATCH
endpoint
/restore/animetheme/:id
Restore a soft-deleted anime theme. Requires authentication.

Force Delete Anime Theme

DELETE
endpoint
/forceDelete/animetheme/:id
Permanently delete an anime theme. Requires authentication.

Build docs developers (and LLMs) love