# MyAnimeList Top API Documentation

Retrieve top anime or manga rankings: for each item the rank, title, url, image, score, members, type and episodes or chapters. Page with the limit parameter (0-based offset, step 50). has_more is true while a Next 50 link exists. A valid empty result is a successful response.

- **Documentation:** [https://scrappa.co/docs/myanimelist-api/myanimelist_top](https://scrappa.co/docs/myanimelist-api/myanimelist_top)
- **API group:** MyAnimeList API
- **Endpoint:** `GET https://scrappa.co/api/myanimelist/top`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | Yes | Ranking type: airing, bypopularity, upcoming, favorite, tv, movie, ova, special, ona, manga, novels, oneshots, doujin, manhwa, manhua, byfavorite. |
| `limit` | integer | No | 0-based offset, step 50. Defaults to 0. |
| `media` | string | No | Media type: anime or manga. Defaults to anime. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/myanimelist/top?type=airing"
```

## Example response

```json
{
    "success": true,
    "data": {
        "type": "airing",
        "media": "anime",
        "limit": 0,
        "items": [
            {
                "rank": 1,
                "title": "Steel Ball Run: JoJo no Kimyou na Bouken",
                "url": "https://myanimelist.net/anime/61469/Steel_Ball_Run__JoJo_no_Kimyou_na_Bouken",
                "image": "https://cdn.myanimelist.net/r/50x70/images/anime/1065/158884.jpg",
                "score": 9.05,
                "members": 246701,
                "type": "ONA"
            }
        ],
        "has_more": true
    },
    "meta": {
        "endpoint_family": "top",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required query parameter is missing or invalid. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
