# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/mangalib/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/mangalib/get-catalog \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mangalib/get-chapter-pages \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mangalib/get-currently-reading \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mangalib/get-manga-chapters \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mangalib/get-manga-comments \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mangalib/get-manga-cover-image \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mangalib/get-manga-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mangalib/get-random-title \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/mangalib/search-titles \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.