Log inSign up

Reader API · v1

API documentation

Everything a reader website needs: list series, browse volumes and chapters, and get the page images of a chapter. All responses are JSON.

Overview

The reader API lives on its own domain and is read-only. Your reader site’s server calls it with a secret key, then passes the signed image links it receives to the visitor’s browser.

Base URL
https://api.tojicdn.com

Only three kinds of path are reachable on that domain:

  • /api/v1/* — the JSON endpoints below (key required)
  • /media/* — page images, protected by signed links
  • /health — returns {"ok": true} (HTTP 200) while the service can reach its database and queue, otherwise {"ok": false} with HTTP 503. Handy for uptime checks

Uploading, deleting and managing the library is done from the admin dashboard and is not part of this API.

Quick start

  1. Get a reader key. Create an account, add your website and request a key. Once an admin approves it, generate your key from your dashboard (see Authentication).
  2. Store it on your server as an environment variable such as MANGIFY_API_KEY.
  3. Send it in the Authorization header of each request:
curl
curl -H "Authorization: Bearer $MANGIFY_API_KEY" \
  "https://api.tojicdn.com/api/v1/series?show=5"

A 200 with a list of series means you are connected. Follow the url field of any item to go one level deeper.

Authentication

Every /api/v1/* request needs a reader key sent as a bearer token:

Authorization: Bearer <READER_API_KEY>
  • Keys are long random strings. Create an account, request access for your website, and once it is approved generate your key from your dashboard (API access). Generating a new key replaces the old one immediately. Every website can have its own key and be revoked separately.
  • A missing or malformed header returns 401 Bearer token required. A wrong key returns 401 Invalid credentials.
  • Keep keys on trusted servers only. Never put one in browser JavaScript, a mobile app, or a NEXT_PUBLIC_ variable.
  • The key is not needed to download images. Those links carry their own signature (see Signed images).

Rate limits

To keep the API fast for everyone, each API key can make up to 60 requests per minute. The limit is counted over a sliding 60 seconds, per key, across all endpoints under /api/v1.

  • Over the limit you get 429 Too Many Requests with a Retry-After header: the number of seconds to wait before trying again. Back off for that long and retry.
  • Cache responses on your server instead of calling the API for every visitor. Series and chapter lists rarely change, so even a few minutes of caching removes most calls. List responses carry ETag and Cache-Control: private, max-age=60: send the ETag back as If-None-Match and an unchanged list is answered 304 Not Modified with no body. (A 304 still counts as a request.) Responses that contain signed page links are never cached.
  • Ask for bigger pages (show=) rather than many small ones, and do not poll in a tight loop.
  • A key that keeps hammering the API is paused automatically for a while, or by hand. A paused key gets 403 This API key is temporarily disabled (also with Retry-After when the pause is timed).
  • Image links do not count against your key; they are signed and served separately (see Signed images).
Handling 429 in JavaScript
async function call(url, key, tries = 3) {
  const res = await fetch(url, {headers: {Authorization: 'Bearer ' + key}});
  if (res.status === 429 && tries > 0) {
    const wait = Number(res.headers.get('retry-after')) || 5;
    await new Promise(r => setTimeout(r, wait * 1000));
    return call(url, key, tries - 1);
  }
  return res;
}

Conventions

Pagination

List endpoints take show (items per page) and page (1-based) and answer with:

{ "total": 42, "page": 1, "show": 20, "pages": 3, "items": [ … ] }

Listings allow up to 100 items per page. Page-image lists allow up to 500. Values outside the range return 422.

Follow the links

Every series, volume and chapter has a ready-made url. Use it as is instead of building paths yourself; it already uses the AniList form once a series has an AniList ID, or the MyAnimeList form when it only has a MAL ID.

Forgiving names

Volume and chapter values are normalised, so these all mean the same thing:

  • Volumes: 1, 01, v1, vol 1, Volume-01 → v01
  • Chapters: 1, 01, c1, ch 1, Chapter-001 → c001; decimals such as 12.5 → c012.5

Anything else returns 400.

Slugs

A series slug is its cleaned folder name: spaces and special characters become - (Goodbye, Eri (2023) becomes Goodbye-Eri-2023). The readable title is returned separately for display.

List series

GET/api/v1/series

A paginated list of every series, newest upload first.

NameInDefaultDescription
showquery20Items per page, 1 to 100.
pagequery1Page number, starting at 1.
qquery(none)Case-insensitive title search, up to 100 characters.
Response
{
  "total": 42,
  "page": 1,
  "show": 20,
  "pages": 3,
  "items": [
    {
      "slug": "Goodbye-Eri-2023",
      "title": "Goodbye, Eri (2023)",
      "anilist_id": 131557,
      "mal_id": 145863,
      "source": "VIZ Media",
      "volume_count": 1,
      "chapter_count": 6,
      "file_count": 214,
      "updated_at": "2026-10-30T18:21:07.123456+00:00",
      "url": "https://api.tojicdn.com/api/v1/anilist/131557"
    }
  ]
}

anilist_id and mal_id are null when the series has not been linked to AniList or MyAnimeList. source is who to credit for the series (a publisher, a group or a link) and is null when none was given; please show it in your reader.

Get a series

GET/api/v1/series/{slug}

The folder index of one series: its volumes and chapters as links. No images are included.

NameInDefaultDescription
slugpathThe series slug.
typequeryallall, volumes or chapters: return just that group.
volumequery(none)Only list chapters from this volume (for example v01).
showquery20Items per page, 1 to 100.
pagequery1Page number, starting at 1.
Response
{
  "series": {
    "slug": "Goodbye-Eri-2023",
    "title": "Goodbye, Eri (2023)",
    "anilist_id": 131557,
    "mal_id": 145863,
    "source": "VIZ Media",
    "volume_count": 1,
    "chapter_count": 6,
    "url": "https://api.tojicdn.com/api/v1/anilist/131557"
  },
  "volumes": {
    "total": 1, "page": 1, "show": 20, "pages": 1,
    "items": [
      {
        "name": "v01",
        "path": "v01",
        "chapters": 6,
        "loose_pages": 0,
        "url": "https://api.tojicdn.com/api/v1/anilist/131557/volumes/v01"
      }
    ]
  },
  "chapters": {
    "total": 6, "page": 1, "show": 20, "pages": 1,
    "items": [
      {
        "name": "c001",
        "path": "v01/c001",
        "volume": "v01",
        "page_count": 38,
        "url": "https://api.tojicdn.com/api/v1/anilist/131557/chapters/c001?volume=v01"
      }
    ]
  }
}

In chapters.items, volume is null for chapters that are not inside a volume, and the url then ends in ?volume=none.

List volumes

GET/api/v1/series/{slug}/volumes

Just the volumes of a series, paginated. Same item shape as volumes.items above.

NameInDefaultDescription
slugpathThe series slug.
showquery20Items per page, 1 to 100.
pagequery1Page number, starting at 1.

List chapters

GET/api/v1/series/{slug}/chapters

Just the chapters of a series, ordered by chapter number.

NameInDefaultDescription
slugpathThe series slug.
volumequery(none)Limit to one volume.
showquery20Items per page, 1 to 100.
pagequery1Page number, starting at 1.

Get a volume

GET/api/v1/series/{slug}/volumes/{volume}

One volume with its chapters. If the volume also has pages that sit outside any chapter folder, pages_url links to them; otherwise it is null.

NameInDefaultDescription
slugpathThe series slug.
volumepathFor example v01, 1 or vol 1.
showquery20Items per page, 1 to 100.
pagequery1Page number, starting at 1.
Response
{
  "series": "Goodbye-Eri-2023",
  "volume": "v01",
  "path": "v01",
  "loose_pages": 4,
  "pages_url": "https://api.tojicdn.com/api/v1/series/Goodbye-Eri-2023/volumes/v01/pages",
  "chapters": { "total": 6, "page": 1, "show": 20, "pages": 1, "items": [ /* as above */ ] }
}

Unknown volumes return 404 Volume not found.

Volume pages

GET/api/v1/series/{slug}/volumes/{volume}/pages

Signed image links for the loose pages directly inside a volume (not those in its chapters). The response has the same shape as a chapter’s pages below.

NameInDefaultDescription
slugpathThe series slug.
volumepathFor example v01.
showquery100Items per page, 1 to 500.
pagequery1Page number, starting at 1.
qualityqueryfullfull for the pages as uploaded, or datasaver for smaller, lighter copies (for readers on mobile data). See Data saver below.

Get a chapter

GET/api/v1/series/{slug}/chapters/{chapter}

The page images of one chapter. This is the endpoint your reader calls to display a chapter.

NameInDefaultDescription
slugpathThe series slug.
chapterpathFor example c001, 1 or ch 1.
volumequery(none)Needed only when the chapter number exists in more than one volume. Use v02, or none for the chapter that has no volume.
showquery100Items per page, 1 to 500.
pagequery1Page number, starting at 1.
qualityqueryfullfull for the pages as uploaded, or datasaver for smaller, lighter copies (for readers on mobile data). See Data saver below.
Response
{
  "series": "Goodbye-Eri-2023",
  "path": "v01/c001",
  "quality": "full",
  "expires_at": 1793990467,
  "total": 38,
  "page": 1,
  "show": 100,
  "pages_total": 1,
  "pages": [
    {
      "number": 1,
      "width": 1200,
      "height": 1800,
      "url": "https://api.tojicdn.com/media/Goodbye-Eri-2023/v01/c001/001.jpg?expires=1793990467&sig=9f2c…"
    }
  ],
  "chapter": "c001",
  "volume": "v01"
}
  • number is the page’s position in the whole chapter (it keeps counting across pages of results).
  • width and height are in pixels. Use them to reserve space and avoid layout jumps while images load.
  • total is the number of images; pages_total is the number of result pages at your show size.
  • expires_at is a Unix timestamp. Links stop working then.

If the same chapter number is found in several volumes and you did not say which, you get 409 with the choices to pick from:

409 response
{
  "detail": {
    "message": "Chapter exists in several volumes; pass ?volume=",
    "choices": [
      { "volume": "v01", "url": "https://api.tojicdn.com/api/v1/series/My-Series/chapters/c001?volume=v01" },
      { "volume": "v02", "url": "https://api.tojicdn.com/api/v1/series/My-Series/chapters/c001?volume=v02" }
    ]
  }
}

Data saver

Add ?quality=datasaver to a chapter or volume pages request to get links to a smaller copy of every page: narrower (about 960 pixels wide by default) and more compressed WebP, typically a fraction of the size. Offer it as a “data saver” switch for readers on mobile data.

https://api.tojicdn.com/api/v1/series/My-Series/chapters/1?quality=datasaver
  • The response has the same shape, with "quality": "datasaver"; width and height are those of the smaller copy.
  • Data-saver links carry v=datasaver and are signed separately: editing a link to switch quality makes it invalid (403). Ask the API again with the other quality instead.
  • Pages where a smaller copy would not help (animated images, pages that are already small) and pages whose copy is still being made are served at full quality through the same link. The aspect ratio is always the same.

AniList & MyAnimeList addressing

Once the admin links a series to an AniList ID, it can be reached at /api/v1/anilist/{id} in place of /api/v1/series/{slug}. A series linked to a MyAnimeList ID can be reached the same way at /api/v1/mal/{id}.

https://api.tojicdn.com/api/v1/anilist/131557/chapters/1?volume=v01
https://api.tojicdn.com/api/v1/mal/145863/chapters/1?volume=v01
  • Every sub-path, parameter and response is identical to the slug form, with the same reader key.
  • Links in responses use the AniList form for series with an AniList ID, otherwise the MyAnimeList form for series with a MAL ID.
  • The slug URLs keep working, so existing integrations do not break.
  • Unknown IDs return 404, and only after your key has been checked.

Signed images

Page URLs point at /media/… and include expires and sig query parameters. They need no Authorization header, so an <img> tag can load them directly.

  • Links are valid for 5 minutes. Request the chapter again for fresh ones rather than storing them.
  • Anyone holding an unexpired link can open it, so only send links to the reader who asked for that chapter.
  • An expired or tampered link returns 403; a file that does not exist returns 404.
  • Images are served as JPEG, PNG, WebP, GIF or AVIF with Cache-Control: private, max-age=300.
  • Do not log full image URLs; the query string is the credential.

A legacy route, /api/v1/chapters/{slug}/pages, returns the pages of the whole series (50 per page by default). Prefer the chapter endpoint above.

Errors

Errors use standard status codes and a JSON body such as {"detail": "Series not found"}.

StatusMeaning
400A volume or chapter value could not be understood.
401Missing or invalid reader key.
403Image link expired or its signature is wrong, or the key is paused (see Rate limits).
404Series, volume, chapter or image not found.
409Chapter exists in several volumes; pass ?volume=.
429Over the rate limit. Wait the number of seconds in Retry-After.
422A query parameter is out of range, such as show=500 on a listing.

Code examples

JavaScript (server-side)
// server-side only (Next.js route handler, Express, Cloudflare Worker, ...)
const API = process.env.MANGIFY_API_URL;      // https://api.tojicdn.com
const KEY = process.env.MANGIFY_API_KEY;      // never expose this to the browser

async function mangify(path) {
  const res = await fetch(API + path, {
    headers: { Authorization: `Bearer ${KEY}` },
    cache: 'no-store',
  });
  if (!res.ok) throw new Error(`Mangify returned ${res.status}`);
  return res.json();
}

// 1. find a series
const { items } = await mangify('/api/v1/series?q=eri');
const series = items[0];

// 2. list its chapters (the "url" fields are ready-made links)
const { chapters } = await mangify(new URL(series.url).pathname + '?type=chapters');

// 3. fetch the pages of the first chapter
const first = chapters.items[0];
const chapter = await mangify(new URL(first.url).pathname + new URL(first.url).search);

// 4. hand the signed image URLs to the reader
const imageUrls = chapter.pages.map(p => p.url);
Python
import os, requests

API = os.environ["MANGIFY_API_URL"]
HEADERS = {"Authorization": f"Bearer {os.environ['MANGIFY_API_KEY']}"}

def mangify(path, **params):
    r = requests.get(API + path, headers=HEADERS, params=params, timeout=15)
    r.raise_for_status()
    return r.json()

series = mangify("/api/v1/series", q="eri")["items"][0]
chapter = mangify(f"/api/v1/series/{series['slug']}/chapters/1", volume="none")
for page in chapter["pages"]:
    print(page["number"], page["width"], page["height"], page["url"])
Rendering a chapter in a Next.js reader
// app/read/[id]/[chapter]/page.jsx  (a Server Component in YOUR reader site)
export default async function Read({ params }) {
  const { id, chapter } = await params;
  const res = await fetch(
    `${process.env.MANGIFY_API_URL}/api/v1/anilist/${id}/chapters/${chapter}?volume=none`,
    { headers: { Authorization: `Bearer ${process.env.MANGIFY_API_KEY}` }, cache: 'no-store' }
  );
  if (!res.ok) return <p>Chapter unavailable.</p>;
  const data = await res.json();
  return data.pages.map(p => (
    <img key={p.number} src={p.url} width={p.width} height={p.height}
         loading="lazy" alt={`Page ${p.number}`} style={{ width: '100%', height: 'auto' }} />
  ));
}
curl
# list series
curl -H "Authorization: Bearer $MANGIFY_API_KEY" "https://api.tojicdn.com/api/v1/series?show=20&page=1"

# one series (volumes and chapters)
curl -H "Authorization: Bearer $MANGIFY_API_KEY" "https://api.tojicdn.com/api/v1/series/Goodbye-Eri-2023"

# only its chapters in volume 1
curl -H "Authorization: Bearer $MANGIFY_API_KEY" "https://api.tojicdn.com/api/v1/series/Goodbye-Eri-2023?type=chapters&volume=1"

# one chapter's pages, by AniList id
curl -H "Authorization: Bearer $MANGIFY_API_KEY" "https://api.tojicdn.com/api/v1/anilist/131557/chapters/1?volume=v01"

# an image (no key needed, the link carries its own signature)
curl -o page.jpg "https://api.tojicdn.com/media/Goodbye-Eri-2023/v01/c001/001.jpg?expires=…&sig=…"

Security notes

  • Call the API from your backend only. Proxy or render on the server; send the browser just the image links.
  • Use one key per website so you can revoke one without breaking the others.
  • Always use HTTPS and avoid putting keys in URLs, history or logs.
  • Fetch chapters with cache: 'no-store' (or short caching) so signed links are never served after they expire.