{
  "openapi": "3.0.1",
  "info": {
    "title": "MyAnimeList Anime Scraper",
    "description": "Collect MyAnimeList anime data as structured records, including titles, scores, rankings, popularity, episode counts, airing status, genres and studios. Choose top, search, season or ID mode. Data comes from Tenrai, a public mirror with a Jikan v4-compatible JSON schema.",
    "version": "0.1",
    "x-build-id": "wtcLZAf3aKVAPH8GZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axiomworks~myanimelist-anime-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axiomworks-myanimelist-anime-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/axiomworks~myanimelist-anime-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axiomworks-myanimelist-anime-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/axiomworks~myanimelist-anime-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axiomworks-myanimelist-anime-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Collection mode (e.g. top)",
            "enum": [
              "top",
              "search",
              "season",
              "ids"
            ],
            "type": "string",
            "description": "Choose 'top' for ranked anime, 'search' for searchQuery or search filters, 'season' for seasonYear + season, or 'ids' for animeIds. Example: 'top'. If omitted, nonempty animeIds selects ids, otherwise searchQuery selects search, otherwise top. Explicit mode overrides inference."
          },
          "searchQuery": {
            "title": "Title keywords (e.g. naruto)",
            "type": "string",
            "description": "Anime title keywords, e.g. 'naruto' or '進撃', up to 200 characters. Used in search mode; omitted mode infers search. Search needs this or at least one of type, status, minScore, genres or ageRating. Empty searches succeed with zero rows; try broader keywords or fewer filters."
          },
          "seasonYear": {
            "title": "Premiere year (e.g. 2023)",
            "minimum": 1917,
            "maximum": 2100,
            "type": "integer",
            "description": "Premiere year for mode 'season', e.g. 2023; whole number 1917-2100. Omit to use the current UTC year. Combine with season; ignored in other modes."
          },
          "season": {
            "title": "Premiere season (e.g. fall)",
            "enum": [
              "winter",
              "spring",
              "summer",
              "fall"
            ],
            "type": "string",
            "description": "Premiere season for mode 'season': winter, spring, summer or fall, e.g. 'fall'. Omit to use the current UTC calendar quarter. Combine with seasonYear; ignored in other modes."
          },
          "animeIds": {
            "title": "Anime IDs or page URLs (e.g. 5114)",
            "type": "array",
            "description": "MyAnimeList anime IDs or anime page URLs for mode 'ids', e.g. ['5114', 'https://myanimelist.net/anime/1535/Death_Note']. Numeric IDs are also accepted by the API. Required in ids mode; omitted mode infers ids from a nonempty list. Duplicates are saved once. Missing IDs are skipped; maxItems is shared across all IDs.",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "title": "Anime format (e.g. movie)",
            "enum": [
              "tv",
              "movie",
              "ova",
              "special",
              "ona",
              "music"
            ],
            "type": "string",
            "description": "Format for search mode: tv, movie, ova, special, ona or music, e.g. 'movie'. Omit for all formats."
          },
          "status": {
            "title": "Airing filter (e.g. complete)",
            "enum": [
              "airing",
              "complete",
              "upcoming"
            ],
            "type": "string",
            "description": "Airing status for search mode: airing, complete or upcoming, e.g. 'complete'. Omit for all statuses."
          },
          "minScore": {
            "title": "Minimum score (e.g. 8)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Minimum anime score for search mode, 0-10, e.g. 8. Omit for no score threshold."
          },
          "genres": {
            "title": "Genre IDs (e.g. 1,2)",
            "type": "string",
            "description": "Comma-separated MyAnimeList genre IDs for search mode, e.g. '1,2' (Action and Adventure; 22 is Romance). Omit for no genre filter."
          },
          "orderBy": {
            "title": "Search sort field (e.g. score)",
            "enum": [
              "popularity",
              "score",
              "rank",
              "members",
              "favorites",
              "title",
              "start_date"
            ],
            "type": "string",
            "description": "Sort search results by popularity, score, rank, members, favorites, title or start_date, e.g. 'score'. Default popularity. Uses descending order except title, which is ascending. Does not change top, season or ids ordering. Override direction with sortDirection.",
            "default": "popularity"
          },
          "maxItems": {
            "title": "Total result limit (e.g. 20)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum unique anime rows across the entire run and all animeIds, e.g. 20. Whole number 1-10000, default 50. Returns fewer if the source runs out or targets fail. Duplicate IDs do not consume this limit. Charged only for rows saved.",
            "default": 50
          },
          "includeDetails": {
            "title": "Include full details (slower)",
            "type": "boolean",
            "description": "If true, top/search/season rows are enriched from the single-anime endpoint with openingThemes, endingThemes, relations, streamingLinks, externalLinks and moreInfo (one extra request per row, about 0.5 s each). Default false: those six fields are null in list modes. Always filled in ids mode.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Retry proxy (e.g. Apify Proxy)",
            "type": "object",
            "description": "Proxy settings, e.g. {\"useApifyProxy\": true}. Default {\"useApifyProxy\": false}. Initial requests are direct; configured proxy is used only on retries with fresh sessions. Persistent blocks succeed with zero rows when no target works; enable a proxy or retry later.",
            "default": {
              "useApifyProxy": false
            }
          },
          "ageRating": {
            "title": "Age rating filter",
            "enum": [
              "all",
              "g",
              "pg",
              "pg13",
              "r17"
            ],
            "type": "string",
            "description": "Age rating for search mode: all for unrestricted (default), g for all ages, pg for children, pg13 for teens 13+, or r17 for ages 17+. Can be the only search filter. Ignored in top, season and ids modes.",
            "default": "all"
          },
          "sortDirection": {
            "title": "Search sort direction",
            "enum": [
              "auto",
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Direction for orderBy in search mode: auto (default) preserves descending order except title ascending; asc sorts low to high and desc high to low. Use asc with popularity or rank to put rank 1 first. Ignored in top, season and ids modes.",
            "default": "auto"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}