{"id":21073912,"url":"https://github.com/md-y/mangadex-full-api","last_synced_at":"2025-04-08T02:43:07.113Z","repository":{"id":43081685,"uuid":"168798357","full_name":"md-y/mangadex-full-api","owner":"md-y","description":"The largest MangaDex API","archived":false,"fork":false,"pushed_at":"2024-09-30T23:28:04.000Z","size":693,"stargazers_count":186,"open_issues_count":0,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-01T01:41:25.979Z","etag":null,"topics":["api","browser","javascript","manga","mangadex","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://md-y.github.io/mangadex-full-api/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/md-y.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-02T05:33:47.000Z","updated_at":"2025-03-15T14:36:24.000Z","dependencies_parsed_at":"2025-03-17T23:44:49.849Z","dependency_job_id":"570c0e57-0386-47b3-936c-3f445ef2c240","html_url":"https://github.com/md-y/mangadex-full-api","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-y%2Fmangadex-full-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-y%2Fmangadex-full-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-y%2Fmangadex-full-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/md-y%2Fmangadex-full-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/md-y","download_url":"https://codeload.github.com/md-y/mangadex-full-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767232,"owners_count":20992538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","browser","javascript","manga","mangadex","nodejs","typescript"],"created_at":"2024-11-19T19:13:38.254Z","updated_at":"2025-04-08T02:43:07.096Z","avatar_url":"https://github.com/md-y.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MangaDex Full API\n\nAn unofficial [MangaDex](https://www.mangadex.org) API built with the [official JSON API](https://api.mangadex.org/docs.html). Supports Node.js and browsers.\n\n[Documentation](https://md-y.github.io/mangadex-full-api)\n\n[![Version](https://img.shields.io/npm/v/mangadex-full-api.svg?style=flat)](https://www.npmjs.com/package/mangadex-full-api)\n[![License](https://img.shields.io/github/license/md-y/mangadex-full-api.svg?style=flat)](https://github.com/md-y/mangadex-full-api/blob/master/LICENSE)\n[![Downloads](https://img.shields.io/npm/dm/mangadex-full-api.svg?style=flat)](https://www.npmjs.com/package/mangadex-full-api)\n\n```bash\nnpm install mangadex-full-api@6.0.0\n```\n\n```javascript\n// Demo\nManga.search({\n    title: 'One Piece',\n    limit: Infinity, // API Max is 100 per request, but this function accepts more\n    hasAvailableChapters: true,\n}).then((mangas) =\u003e {\n    console.log('There are', mangas.length, 'mangas with One Piece in the title!');\n    mangas.forEach((manga) =\u003e {\n        console.log(manga.localTitle);\n    });\n});\n```\n\n# Tutorials\n\n-   [Authentication](#authentication)\n-   [Getting Page Images](#page-images)\n-   [Relationships](#relationships)\n-   [Finding Manga](#finding-manga)\n-   [Uploading Chapters](#uploading-chapters)\n\nView more info on the [documentation website](https://md-y.github.io/mangadex-full-api).\n\n#### Authentication\n\nTo login with a personal account, you must have a [Client ID and Secret](https://api.mangadex.dev/docs/02-authentication/personal-clients/).\n\n```javascript\nawait loginPersonal({\n    clientId: 'id',\n    clientSecret: 'secret',\n    password: 'password',\n    username: 'username',\n});\n```\n\n#### Page Images\n\n```javascript\n// Get a manga with chapters\nconst manga = await Manga.getByQuery({ order: { followedCount: 'desc' }, availableTranslatedLanguage: ['en'] });\nif (!manga) throw new Error('No manga found!');\n\n// This will get the first English chapter for this manga\nconst chapters = await manga.getFeed({ translatedLanguage: ['en'], limit: 1 });\nconst chapter = chapters[0];\n\n// Get the image URLs for this chapter\nconst pages = await chapter.getReadablePages();\nconsole.log(pages);\n```\n\n#### Relationships\n\nMangaDex will return Relationship objects for associated data objects instead of the entirety of each object.\n\nFor example, authors and artists will be returned as `Relationship\u003cAuthor\u003e` when requesting a manga. To request the author data, use the `resolve` method.\n\nAdditionally, you can supply `'author'` to the `includes` parameter to include the author data alongside the manga request. You will still need to call the `resolve` method, but the promise will return instantly.\n\n```javascript\nconst manga = await Manga.getRandom();\nconst firstAuthor = await manga.authors[0].resolve();\nconsole.log('The first author is', firstAuthor.name);\n\n// Use resolveArray to resolve an array of Relationships more efficiently\nconst allAuthors = await resolveArray(manga.authors);\nconsole.log('All authors are', allAuthors.map((a) =\u003e a.name).join(', '));\n\n// Because authors are included, the author relationships are cached\nconst otherManga = await Manga.getByQuery({ includes: ['author'] });\nif (otherManga) {\n    console.log('The authors for this manga are included and cached:', otherManga.authors[0].cached);\n    const author = await otherManga.authors[0].resolve();\n    console.log('The author is', author.name);\n}\n```\n\n#### Finding Manga\n\nThe most common way to find manga is to use the `search` method. However, there are a few other ways as well:\n\n```javascript\n// Basic Search\nManga.search({\n    title: 'One Piece',\n    limit: Infinity, // API Max is 100 per request, but this function accepts more\n    hasAvailableChapters: true,\n}).then((mangas) =\u003e {\n    console.log('There are', mangas.length, 'mangas with One Piece in the title!');\n    mangas.forEach((manga) =\u003e {\n        console.log(manga.localTitle);\n    });\n});\n\n// This will return the first result from a search\nManga.getByQuery({ title: 'One Piece' }).then((manga) =\u003e {\n    if (manga) console.log('Found a One Piece manga with id', manga.id);\n    else console.log('No One Piece manga found');\n});\n\n// You can get a random manga\nManga.getRandom().then((manga) =\u003e console.log('Random:', manga.localTitle));\n\n// You can get manga directly by UUID\nManga.get('manga-uuid-here').then((manga) =\u003e console.log(manga));\n```\n\n#### Uploading Chapters\n\n```javascript\n// Login with your credentials\nawait loginPersonal({\n    clientId: 'id',\n    clientSecret: 'secret',\n    password: 'password',\n    username: 'username',\n});\n\n// Create a new chapter upload session for a manga\nconst session = await UploadSession.begin('manga-id', ['group-id']);\n\n// Upload pages as Blobs\nawait session.uploadPages([\n    new Blob([fs.readFileSync('path/to/page1.jpg')], new Blob([fs.readFileSync('path/to/page2.jpg')])),\n]);\n\n// Commit the chapter\nawait session.commit({\n    chapter: '1',\n    title: 'A new chapter!',\n    translatedLanguage: 'en',\n    volume: '1',\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmd-y%2Fmangadex-full-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmd-y%2Fmangadex-full-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmd-y%2Fmangadex-full-api/lists"}