Skip to content

ewgsta/weeb-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weeb API

Documentation for the official anime API, developed for the Weeb.


Related Projects

  • Weeb CLI - Command-line interface for accessing this API.
  • Weeb GUI - Graphical user interface for browsing and watching.

API Documentation

Anime List (GET /animes)

Lists all animes with pagination.

Parameters:

  • page: Page number (Default: 1)
  • limit: Items per page (Default: 20)

Response (200 OK):

{
  "data": [
    {
      "id": "6781edaad8b0745f144982ef",
      "name": "Ubel Blatt",
      "slug": "ubel-blatt",
      "first_image": "https://...",
      "season_number": 1
    }
  ],
  "page": 1,
  "limit": 20
}

Anime Detail (GET /animes/:slug)

Retrieves full details of an anime, including episodes, categories, and related content.

Parameters:

  • :slug: Unique slug of the anime (e.g., ubel-blatt).

Response (200 OK):

{
  "data": {
    "id": "6781edaad8b0745f144982ef",
    "name": "Ubel Blatt",
    "description": "An epic fantasy adventure...",
    "categories": ["Action", "Adventure"],
    "episodes": [
      {
        "episode_number": 1,
        "type": "TV",
        "sources": [
          { "label": "Primary (CDN)", "watch_url": "/watch/eyJpZCI6IjY3ODFlZGM3ZDhiMDc0NWYxNDQ5ODJmOSIsInNyYyI6ImJhY2tibGF6ZSIsInRzIjoxNzQxNTM4NTQzMTIxfQ==" },
          { "label": "Mirror 1", "watch_url": "/watch/..." }
        ]
      }
    ],
    "related_animes": [
      { "id": "...", "name": "...", "slug": "...", "first_image": "..." }
    ]
  }
}

Video Stream (GET /watch/:token)

Note: This endpoint returns direct video data (binary). Tokens include a timestamp and are temporary. Compatible with HTML5 Video Player (supports Range headers).


Search (GET /search)

Performs a fast name-based search.

Parameters:

  • q: Search term (Minimum 2 characters).

Response (200 OK):

{
  "data": [
    {
      "id": "...",
      "name": "One Piece",
      "slug": "one-piece",
      "first_image": "..."
    }
  ]
}

Categories and Filtering

Endpoint Description
GET /categories Lists all categories and their IDs.
GET /categories/:id/animes Lists all animes with a specific category ID.

Category ID Table: 1: Action, 2: Military, 3: Sci-Fi, 4: Magic, 5: Supernatural, 6: Drama, 7: Ecchi, 8: Fantasy, 9: Thriller, 10: Mystery... (Complete list can be retrieved from the /categories endpoint).


Error Handling

  • 400 Bad Request: Missing or invalid parameters.
  • 403 Forbidden: IP Banned or Invalid Token.
  • 404 Not Found: Record not found.
  • 429 Too Many Requests: Rate Limit exceeded.
  • 500 Internal Server Error: Unexpected server error.

About

Official API for Weeb CLI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors