# Mangalib — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Browse and search a comprehensive manga catalog, read chapters and pages, view manga details and cover images, and discover personalized recommendations. Access comments, track your currently reading list, and find random titles to explore.

**Category:** Entertainment | **Website:** [mangalib.org/](https://mangalib.org/) | **Docs:** [parse.bot/marketplace/da5721d4-72ca-417e-b790-88b9d712d559/mangalib-org-api](https://parse.bot/marketplace/da5721d4-72ca-417e-b790-88b9d712d559/mangalib-org-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_catalog

Retrieve the manga catalog with optional filtering by genres, types, name, and sorting. Returns paginated results (60 items per page). Supports sorting by average rating, name, creation date, last chapter date, views, or chapter count. Genre and type IDs correspond to the platform's internal classification system.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `genres` | string | No | Comma-separated genre IDs to filter by (e.g. '34,35,43'). |
| `name` | string | No | Filter by name (partial match). |
| `page` | integer | No | Page number for pagination. |
| `sort_by` | string | No | Sort field for catalog results. |
| `sort_type` | string | No | Sort direction. |
| `types` | string | No | Comma-separated type IDs to filter by (e.g. '1,5,6'). Type 1=Manga, 4=OEL-manga, 5=Manhwa, 6=Manhua, 8=Rumanga. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/get_catalog \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"genres":"<string>","name":"<string>","page":"<integer>","sort_by":"<string>","sort_type":"<string>","types":"<string>"}'
```

### get_chapter_pages

Get page image URLs for a specific chapter. The volume and number must correspond to an existing chapter for the manga. Returns full chapter metadata and an array of page objects with image URLs and dimensions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `number` | string | Yes | Chapter number (e.g. '1', '0', '2.5'). Must match an existing chapter from get_manga_chapters. |
| `slug_url` | string | Yes | Slug URL of the manga (e.g. '195--naruto'). Obtainable from search_titles or get_catalog results. |
| `volume` | string | No | Volume number. Must match the volume of the target chapter from get_manga_chapters. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/get_chapter_pages \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number":"<string>","slug_url":"<string>","volume":"<string>"}'
```

### get_currently_reading

Get trending and popular titles from the MangaLib homepage. Returns popular manga (latest updates), user collections, reviews, newest titles, weekly top users, news, forum threads, and slider content.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/get_currently_reading \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_manga_chapters

Get the list of chapters for a manga, including volume numbers, chapter numbers, names, and branch/team information. Chapters are returned in reading order. Each chapter entry includes all translation branches available.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug_url` | string | Yes | Slug URL of the manga (e.g. '195--naruto'). Obtainable from search_titles or get_catalog results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/get_manga_chapters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug_url":"<string>"}'
```

### get_manga_comments

Get comments for a manga title, including root comments and replies combined into a single list. Returns paginated results with 25 comments per page. Comments include user info, vote counts, and nesting level.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `manga_id` | string | Yes | Numeric ID of the manga (e.g. '195'). Obtainable from search_titles or get_manga_details results. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/get_manga_comments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"manga_id":"<string>","page":"<integer>"}'
```

### get_manga_cover_image

Retrieve cover and banner image URLs for a manga title. Returns the thumbnail (small), full-size cover, and background banner image URLs.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug_url` | string | Yes | Slug URL of the manga (e.g. '195--naruto'). Obtainable from search_titles or get_catalog results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/get_manga_cover_image \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug_url":"<string>"}'
```

### get_manga_details

Get full details for a specific manga title by its slug URL. Returns comprehensive information including summary, genres, tags, authors, artists, teams, franchise, rating, views, release date, and publication status. The slug_url is obtainable from search_titles or get_catalog results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug_url` | string | Yes | Slug URL of the manga (e.g. '195--naruto'). Obtainable from search_titles or get_catalog results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/get_manga_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug_url":"<string>"}'
```

### get_random_title

Get a random manga title from the catalog. Returns a single randomly selected manga item with basic metadata including cover, type, rating, and status.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/get_random_title \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_titles

Search for manga titles by keyword. Returns matching manga items with basic metadata including rating. Results include all site content matching the query string against title fields.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'Naruto', 'Bleach', 'One Piece'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-mangalib-org-api-da5721d4/search_titles \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
