Skip to main content
The Anime type represents a production with at least one opening or ending sequence. For example, Bakemonogatari is an anime production with five opening sequences and one ending sequence.

Type Definition

type Anime {
  # Identification
  anime_id: Int!
  name: String!
  slug: String!
  
  # Metadata
  year: Int
  season: AnimeSeason
  season_localized: String
  media_format: AnimeMediaFormat
  media_format_localized: String
  synopsis: String
  
  # Timestamps
  created_at: String!
  updated_at: String!
  deleted_at: String
  
  # Relationships
  animethemes: [AnimeTheme!]!
  synonyms: [Synonym!]!
  animesynonyms: [AnimeSynonym!]! @deprecated
  images: [Image!]!
  resources: [ExternalResource!]!
  series: [Series!]!
  studios: [Studio!]!
}

Fields

anime_id

Unique identifier for the anime.
  • Type: Int!
  • Example: 1

name

The primary name of the anime.
  • Type: String!
  • Example: "Bakemonogatari"

slug

URL-friendly identifier.
  • Type: String!
  • Example: "bakemonogatari"

year

The year the anime was released.
  • Type: Int
  • Example: 2009

season

The broadcast season.
  • Type: AnimeSeason
  • Values: WINTER, SPRING, SUMMER, FALL

media_format

The format of the anime production.
  • Type: AnimeMediaFormat
  • Values: TV, MOVIE, OVA, ONA, SPECIAL, MUSIC_VIDEO

synopsis

A brief description of the anime.
  • Type: String
  • Example: "Koyomi Araragi, a third-year high school student..."

Relationships

animethemes

The opening and ending themes for this anime.
{
  anime(anime_id: 1) {
    animethemes {
      theme_id
      type
      sequence
      slug
      song {
        title
      }
    }
  }
}
Returns: [AnimeTheme!]!

synonyms

Alternative names and titles for this anime.
{
  anime(anime_id: 1) {
    synonyms {
      text
      type
    }
  }
}
Returns: [Synonym!]!

images

Cover images and artwork for this anime.
{
  anime(anime_id: 1) {
    images {
      path
      facet
      link
    }
  }
}
Returns: [Image!]!

resources

External links (MAL, AniList, AniDB, etc.).
{
  anime(anime_id: 1) {
    resources {
      external_id
      site
      link
    }
  }
}
Returns: [ExternalResource!]!

series

The series this anime belongs to (e.g., Monogatari Series).
{
  anime(anime_id: 1) {
    series {
      series_id
      name
      slug
    }
  }
}
Returns: [Series!]!

studios

Animation studios that produced this anime.
{
  anime(anime_id: 1) {
    studios {
      studio_id
      name
      slug
    }
  }
}
Returns: [Studio!]!

Queries

Single Anime

Query a single anime by ID.
query GetAnime($id: Int!) {
  anime(anime_id: $id) {
    anime_id
    name
    slug
    year
    season
    animethemes {
      slug
      type
      song {
        title
      }
    }
  }
}
Variables:
{
  "id": 1
}

Anime Pagination

Query multiple anime with filtering and sorting.
query ListAnime($page: Int, $first: Int, $year: Int) {
  animePagination(
    page: $page
    first: $first
    filter: { year: { eq: $year } }
    sort: [{ column: NAME, direction: ASC }]
  ) {
    data {
      anime_id
      name
      slug
      year
      season
    }
    pagination {
      total
      current_page
      has_more_pages
    }
  }
}
Variables:
{
  "page": 1,
  "first": 25,
  "year": 2023
}

Search Anime

Search anime by name or synonym.
query SearchAnime($searchTerm: String!) {
  animePagination(
    search: $searchTerm
    first: 10
  ) {
    data {
      anime_id
      name
      slug
      year
      synonyms {
        text
      }
    }
  }
}
Variables:
{
  "searchTerm": "bakemonogatari"
}

Anime with Themes and Videos

Query anime with nested theme and video data.
query AnimeWithVideos($id: Int!) {
  anime(anime_id: $id) {
    name
    animethemes {
      slug
      type
      song {
        title
        performances {
          as
          artist {
            ... on Artist {
              name
            }
          }
        }
      }
      animethemeentries {
        version
        episodes
        videos {
          basename
          resolution
          source
          tags
          link
        }
      }
    }
  }
}

Filter by Season and Year

query AnimeBySeasonYear($year: Int!, $season: AnimeSeason!) {
  animePagination(
    filter: { 
      year: { eq: $year }
      season: { eq: $season }
    }
    sort: [{ column: NAME, direction: ASC }]
  ) {
    data {
      name
      slug
      media_format
      studios {
        name
      }
    }
  }
}
Variables:
{
  "year": 2023,
  "season": "FALL"
}

Find Anime by External ID

Find anime using an external site ID (e.g., MyAnimeList ID).
query FindAnimeByExternalSite($site: String!, $externalId: Int!) {
  findAnimeByExternalSite(
    site: $site
    external_id: $externalId
  ) {
    anime_id
    name
    slug
    year
    resources {
      site
      external_id
      link
    }
  }
}
Variables:
{
  "site": "MyAnimeList",
  "externalId": 5081
}

Example Responses

Basic Anime Query

{
  "data": {
    "anime": {
      "anime_id": 1,
      "name": "Bakemonogatari",
      "slug": "bakemonogatari",
      "year": 2009,
      "season": "SUMMER",
      "animethemes": [
        {
          "slug": "OP1",
          "type": "OP",
          "song": {
            "title": "Staple Stable"
          }
        }
      ]
    }
  }
}

Pagination Response

{
  "data": {
    "animePagination": {
      "data": [
        {
          "anime_id": 1,
          "name": "Bakemonogatari",
          "slug": "bakemonogatari",
          "year": 2009,
          "season": "SUMMER"
        }
      ],
      "pagination": {
        "total": 1,
        "current_page": 1,
        "has_more_pages": false
      }
    }
  }
}

Filterable Columns

  • anime_id
  • name
  • slug
  • year
  • season
  • media_format
  • created_at
  • updated_at
  • deleted_at

Sortable Columns

  • ANIME_ID
  • NAME
  • SLUG
  • YEAR
  • CREATED_AT
  • UPDATED_AT

Build docs developers (and LLMs) love