{
  "title": "IMDb Scraper Input",
  "description": "Search IMDb titles, fetch titles by ID, browse charts, run advanced searches, export user reviews, or list every episode of a TV series.",
  "type": "object",
  "schemaVersion": 1,
  "properties": {
    "mode": {
      "title": "Mode",
      "type": "string",
      "description": "What to fetch from IMDb: title search, direct IDs, a chart, the popularity meter, a filtered search, user reviews, or TV episodes.",
      "editor": "select",
      "enum": [
        "topRated",
        "search",
        "byId",
        "popular",
        "advanced",
        "reviews",
        "episodes"
      ],
      "enumTitles": [
        "Top 250 & Other Charts",
        "Search Titles",
        "Fetch by IMDb ID",
        "Popular Now (IMDb Meter)",
        "Advanced Search",
        "User Reviews",
        "TV Series Episodes"
      ],
      "default": "topRated",
      "prefill": "topRated"
    },
    "searchQuery": {
      "title": "Search Query",
      "type": "string",
      "description": "Free-text title search, e.g. 'inception' or 'breaking bad'. Used in search mode.",
      "editor": "textfield",
      "sectionCaption": "Search titles",
      "sectionDescription": "Used by search mode. The query is matched against IMDb's full title catalog.",
      "prefill": "inception"
    },
    "imdbIds": {
      "title": "IMDb Title IDs",
      "type": "array",
      "description": "IMDb title IDs (e.g. tt0111161) or title URLs. Used by byId, reviews and episodes modes. In episodes mode, pass TV series IDs.",
      "editor": "stringList",
      "default": [],
      "prefill": [],
      "sectionCaption": "IMDb IDs",
      "sectionDescription": "Used by byId, reviews and episodes modes. Accepts bare IDs (tt0111161), numbers (111161), or full IMDb title URLs."
    },
    "reviewSortBy": {
      "title": "Review Sort Order",
      "type": "string",
      "description": "How to order reviews in reviews mode.",
      "editor": "select",
      "enum": [
        "HELPFULNESS_SCORE",
        "USER_RATING",
        "SUBMISSION_DATE",
        "TOTAL_VOTES"
      ],
      "enumTitles": [
        "Most Helpful",
        "Highest Reviewer Rating",
        "Newest Submission",
        "Most Helpfulness Votes"
      ],
      "default": "HELPFULNESS_SCORE",
      "prefill": "HELPFULNESS_SCORE",
      "sectionCaption": "Review options",
      "sectionDescription": "Only used in reviews mode."
    },
    "reviewSortOrder": {
      "title": "Review Sort Direction",
      "type": "string",
      "description": "Ascending or descending order for the review sort.",
      "editor": "select",
      "enum": [
        "DESC",
        "ASC"
      ],
      "enumTitles": [
        "Descending",
        "Ascending"
      ],
      "default": "DESC",
      "prefill": "DESC"
    },
    "excludeSpoilers": {
      "title": "Exclude Spoiler Reviews",
      "type": "boolean",
      "description": "Skip reviews flagged as containing spoilers.",
      "default": false,
      "prefill": false
    },
    "titleType": {
      "title": "Title Type",
      "type": "string",
      "description": "Restrict results to one content type. Used in search, popular and advanced modes.",
      "editor": "select",
      "enum": [
        "",
        "movie",
        "tvSeries",
        "short",
        "tvMiniSeries",
        "tvMovie",
        "tvSpecial",
        "videoGame",
        "podcastSeries"
      ],
      "enumTitles": [
        "All Types",
        "Feature Film",
        "TV Series",
        "Short Film",
        "Mini-Series",
        "TV Movie",
        "TV Special",
        "Video Game",
        "Podcast Series"
      ],
      "default": "",
      "prefill": "",
      "sectionCaption": "Filters",
      "sectionDescription": "Filters apply to search, advanced, popular and chart modes where noted. Reviews and episodes modes use only the IDs list."
    },
    "genres": {
      "title": "Genres",
      "type": "array",
      "description": "Filter by genres, e.g. Drama, Thriller, Sci-Fi. Multiple genres are combined with AND. Used in search and advanced modes.",
      "editor": "stringList",
      "default": [],
      "prefill": []
    },
    "languages": {
      "title": "Spoken Languages",
      "type": "array",
      "description": "Filter by spoken-language codes, e.g. en, fr, hi, ta. Multiple languages are combined with OR. Used in search and advanced modes.",
      "editor": "stringList",
      "default": [],
      "prefill": []
    },
    "countries": {
      "title": "Countries of Origin",
      "type": "array",
      "description": "Filter by country-of-origin codes, e.g. US, GB, IN, JP. Multiple countries are combined with OR. Used in search and advanced modes.",
      "editor": "stringList",
      "default": [],
      "prefill": []
    },
    "runtimeMin": {
      "title": "Runtime (min minutes)",
      "type": "integer",
      "description": "Only include titles at least this many minutes long. Used in search and advanced modes.",
      "minimum": 1,
      "maximum": 1440
    },
    "runtimeMax": {
      "title": "Runtime (max minutes)",
      "type": "integer",
      "description": "Only include titles at most this many minutes long. Used in search and advanced modes.",
      "minimum": 1,
      "maximum": 1440
    },
    "yearMin": {
      "title": "Release Year (min)",
      "type": "integer",
      "description": "Include only titles released on or after this year.",
      "minimum": 1880,
      "maximum": 2030
    },
    "yearMax": {
      "title": "Release Year (max)",
      "type": "integer",
      "description": "Include only titles released on or before this year.",
      "minimum": 1880,
      "maximum": 2030
    },
    "minRating": {
      "title": "Minimum IMDb Rating",
      "type": "number",
      "description": "Only include titles with at least this IMDb rating (1-10).",
      "minimum": 1,
      "maximum": 10
    },
    "minVotes": {
      "title": "Minimum Vote Count",
      "type": "integer",
      "description": "Only include titles with at least this many IMDb votes.",
      "minimum": 0,
      "maximum": 10000000
    },
    "sortBy": {
      "title": "Sort By",
      "type": "string",
      "description": "Sort field for search and advanced modes.",
      "editor": "select",
      "enum": [
        "RANKING",
        "USER_RATING",
        "USER_RATING_COUNT",
        "RELEASE_DATE",
        "TITLE_REGIONAL",
        "METACRITIC_SCORE"
      ],
      "enumTitles": [
        "Relevance",
        "Highest Rated",
        "Most Votes",
        "Release Date (Newest)",
        "Alphabetical",
        "Metacritic Score"
      ],
      "default": "RANKING",
      "prefill": "RANKING"
    },
    "sortOrder": {
      "title": "Sort Direction",
      "type": "string",
      "description": "Sort direction for search and advanced modes.",
      "editor": "select",
      "enum": [
        "DESC",
        "ASC"
      ],
      "enumTitles": [
        "Descending",
        "Ascending"
      ],
      "default": "DESC",
      "prefill": "DESC"
    },
    "topRatedChart": {
      "title": "Chart",
      "type": "string",
      "description": "Which IMDb chart to fetch in topRated mode.",
      "editor": "select",
      "enum": [
        "TOP_250",
        "TOP_250_ENGLISH",
        "TOP_250_TV",
        "BOTTOM_100",
        "TOP_50_BENGALI",
        "TOP_50_MALAYALAM",
        "TOP_50_TAMIL",
        "TOP_50_TELUGU",
        "TOP_250_INDIA"
      ],
      "enumTitles": [
        "Top 250 Movies (All Languages)",
        "Top 250 English-Language Movies",
        "Top 250 TV Shows",
        "Bottom 100 Movies",
        "Top 50 Bengali Movies",
        "Top 50 Malayalam Movies",
        "Top 50 Tamil Movies",
        "Top 50 Telugu Movies",
        "Top 250 Indian Movies"
      ],
      "default": "TOP_250",
      "prefill": "TOP_250",
      "sectionCaption": "Chart",
      "sectionDescription": "Used by topRated mode only. For the current most popular titles, use Popular Now mode."
    },
    "maxItems": {
      "title": "Max Items",
      "type": "integer",
      "description": "Maximum number of records to return across all requested IDs (1-1000). Each review or episode is one record. Results are paginated, so the upstream 50-reviews-per-request limit does not cap this.",
      "minimum": 1,
      "maximum": 1000,
      "default": 50,
      "prefill": 3,
      "sectionCaption": "Output",
      "sectionDescription": "Keep the daily test run small; increase this for real exports."
    }
  },
  "required": [
    "mode"
  ]
}
