# MyAnimeList Scraper (`muhammadafzal/myanimelist-scraper`) Actor

Collect public MyAnimeList anime and manga titles, scores, ranks, popularity, genres, synopsis, and related metadata from title URLs, rankings, or search.

- **URL**: https://apify.com/muhammadafzal/myanimelist-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 anime or manga titles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## MyAnimeList Scraper

Collect public MyAnimeList anime and manga records into an Apify dataset. Use title URLs, top anime or manga rankings, or a title search. Records contain the MAL ID, title, score, rank, popularity, member count, synopsis, genres, cover URL, and anime or manga specific counts where the public page provides them. Missing values are `null`.

### Input

```json
{ "mode": "topAnime", "maxResults": 20, "maxPages": 1, "includeDetails": true }
```

Modes: `topAnime`, `topManga`, `searchAnime`, `searchManga`, and `urls`. Search modes require `query`; URL mode requires `startUrls` containing 1–20 public `myanimelist.net/anime/<id>` or `/manga/<id>` detail URLs. `maxResults` is 1–100 and `maxPages` is 1–5. Each listing page normally holds up to 50 candidates. Set `includeDetails` to `false` for faster listing-only records; detail-only fields will be null. URL mode always fetches details.

```json
{ "mode": "searchManga", "query": "Berserk", "maxResults": 5, "maxPages": 1 }
```

```json
{ "mode": "urls", "startUrls": [{ "url": "https://myanimelist.net/anime/1/Cowboy_Bebop" }], "maxResults": 1 }
```

The default dataset contains one record per unique MAL ID and media type. The `SUMMARY` key-value record reports `DATA`, `EMPTY`, `BLOCKED`, or `REJECTED`, the delivered count, and warnings. A site challenge or parser failure never creates a made-up title row. Verified Apify free-plan runs are limited to five delivered records; paid runs use `maxResults`.

### Pricing

Pay per event is configured on the private Actor. Apify charges the synthetic run start event and one synthetic default-dataset-item event per delivered record. No result event is charged for an empty or blocked result. Platform usage pass-through is disabled.

| Event | FREE | BRONZE | SILVER | GOLD | PLATINUM | DIAMOND |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| Actor start | $0.005 | $0.005 | $0.005 | $0.005 | $0.005 | $0.005 |
| Delivered title | $0.010 | $0.00975 | $0.0095 | $0.008 | $0.008 | $0.008 |

The title-event discounts are 0%, 2.5%, 5%, and 20% through GOLD, with the GOLD price also used for PLATINUM and DIAMOND. On FREE pricing, one title totals $0.015 and five titles total $0.055 in event charges. A one-title cloud canary used about $0.00024 in Apify resources; larger-run cost and reliability are being validated.

### Limits and responsible use

The Actor fetches public pages without a login, CAPTCHA bypass, or private data. Requests are sequential and paced. MyAnimeList may block automated traffic or change its HTML; `SUMMARY` records those outcomes. Check MyAnimeList's terms and obtain any rights needed for your use of the data. Images remain hosted by their original owner.

### Local development

```bash
npm ci
npm test
apify run
```

Set local test input in `storage/key_value_stores/default/INPUT.json`. Local storage is not cloud storage. Push privately with `apify push` from this directory. Run `node scripts/configure-live.mjs <actor-id>` to idempotently configure private PPE metadata and Task presets with the current authenticated Apify CLI.

Five distinct private Task configurations are stored in `tasks/presets.json`. Verify each Task run, output, and billing before publication.

# Actor input Schema

## `mode` (type: `string`):

Choose top anime, top manga, title search, or specific anime/manga detail URLs.

## `query` (type: `string`):

Anime or manga title to search. Required for a search mode.

## `startUrls` (type: `array`):

Public MyAnimeList anime or manga detail URLs. Required for URL mode.

## `maxResults` (type: `integer`):

Maximum unique title records across all pages. 1–100; free-plan runs are capped at five.

## `maxPages` (type: `integer`):

Ranking or search pages to request, up to five. Not used for URL mode.

## `includeDetails` (type: `boolean`):

Fetch each title page for synopsis, genres, studios/authors, and detailed stats. When off, ranking/search records may have null detail fields.

## Actor input object example

```json
{
  "mode": "topAnime",
  "query": "Cowboy Bebop",
  "startUrls": [
    {
      "url": "https://myanimelist.net/anime/1/Cowboy_Bebop"
    }
  ],
  "maxResults": 20,
  "maxPages": 1,
  "includeDetails": true
}
```

# Actor output Schema

## `titles` (type: `string`):

Anime and manga records.

## `summary` (type: `string`):

Counts and warnings.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "Cowboy Bebop",
    "startUrls": [
        {
            "url": "https://myanimelist.net/anime/1/Cowboy_Bebop"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/myanimelist-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "Cowboy Bebop",
    "startUrls": [{ "url": "https://myanimelist.net/anime/1/Cowboy_Bebop" }],
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/myanimelist-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "Cowboy Bebop",
  "startUrls": [
    {
      "url": "https://myanimelist.net/anime/1/Cowboy_Bebop"
    }
  ]
}' |
apify call muhammadafzal/myanimelist-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/myanimelist-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gzaVZ3MDAFTaXHDBh/builds/82XHCNqJan3vwOuX6/openapi.json
