Skip to main content
This guide will help you make your first API call to the AnimeThemes Server and retrieve anime theme data.

Using the public API

The easiest way to get started is to use the public AnimeThemes API at https://api.animethemes.moe. No authentication is required for read operations.
1

Make your first request

Let’s retrieve a list of anime from the database. The API returns paginated results with metadata.
curl https://api.animethemes.moe/api/anime
The API returns 15 results per page by default. You can customize pagination using the page[size] and page[number] query parameters.
2

Understanding the response

The API returns a JSON response with the following structure:
Response format
{
  "anime": [
    {
      "id": 1,
      "name": "Cowboy Bebop",
      "slug": "cowboy_bebop",
      "year": 1998,
      "season": "Spring",
      "media_format": "TV",
      "synopsis": "In the year 2071...",
      "created_at": "2017-10-03T18:26:14.000000Z",
      "updated_at": "2024-01-15T10:30:22.000000Z",
      "deleted_at": null
    }
  ],
  "links": {
    "first": "https://api.animethemes.moe/api/anime?page[number]=1",
    "last": "https://api.animethemes.moe/api/anime?page[number]=450",
    "prev": null,
    "next": "https://api.animethemes.moe/api/anime?page[number]=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 450,
    "path": "https://api.animethemes.moe/api/anime",
    "per_page": 15,
    "to": 15,
    "total": 6750
  }
}
All timestamps are in ISO 8601 format (UTC). The deleted_at field is null for active resources.
3

Get a specific anime

You can retrieve a specific anime by its ID or slug:
curl https://api.animethemes.moe/api/anime/1
The response includes detailed information about the anime:
Response
{
  "anime": {
    "id": 1,
    "name": "Cowboy Bebop",
    "slug": "cowboy_bebop",
    "year": 1998,
    "season": "Spring",
    "media_format": "TV",
    "synopsis": "In the year 2071, humanity has colonized...",
    "created_at": "2017-10-03T18:26:14.000000Z",
    "updated_at": "2024-01-15T10:30:22.000000Z",
    "deleted_at": null
  }
}
4

Include related resources

Use the include parameter to fetch related data in a single request:
Include anime themes
curl "https://api.animethemes.moe/api/anime/cowboy_bebop?include=animethemes"
This returns the anime with its themes nested in the response:
Response with themes
{
  "anime": {
    "id": 1,
    "name": "Cowboy Bebop",
    "slug": "cowboy_bebop",
    "animethemes": [
      {
        "id": 1,
        "anime_id": 1,
        "type": "OP",
        "sequence": 1,
        "slug": "OP1",
        "created_at": "2017-10-03T18:26:15.000000Z",
        "updated_at": "2023-08-20T14:12:30.000000Z"
      }
    ]
  }
}
You can include multiple relationships by separating them with commas: include=animethemes,images,studios
5

Filter and search

The API supports filtering results using query parameters:
curl "https://api.animethemes.moe/api/anime?filter[year]=2020"
See the filtering documentation for advanced filter options and operators.

Try the GraphQL API

AnimeThemes also provides a GraphQL endpoint for more flexible queries:
GraphQL query
curl -X POST https://api.animethemes.moe/graphql \
  -H "Content-Type: application/json" \
  -d '{
    "query": "{ anime(slug: \"cowboy_bebop\") { name year season animethemes { type sequence } } }"
  }'

Explore GraphQL

Learn more about using the GraphQL API for complex queries

Common endpoints

Here are some frequently used endpoints to explore:

Anime

GET /api/animeBrowse all anime in the database

Themes

GET /api/animethemeGet anime opening and ending themes

Artists

GET /api/artistFind artists and performers

Videos

GET /api/videoAccess theme videos and WebMs

Songs

GET /api/songBrowse theme songs

Search

GET /api/searchSearch across all resources

Rate limits

The public API has rate limits to ensure fair usage:
  • REST API: 90 requests per minute
  • GraphQL API: 90 requests per minute
  • Video streaming: 90 requests per minute
If you exceed the rate limit, you’ll receive a 429 Too Many Requests response. Implement exponential backoff in your application to handle rate limits gracefully.

Next steps

REST API reference

Explore all available endpoints and parameters

Authentication

Learn how to authenticate for write operations

Pagination

Master pagination and cursor-based navigation

Install locally

Set up your own AnimeThemes Server instance

Build docs developers (and LLMs) love