{
  "openapi": "3.0.1",
  "info": {
    "title": "League of Legends Stats, Builds & Counters - OP.GG",
    "description": "League of Legends champion data from OP.GG: tier list with win, pick and ban rates, best builds and runes, counters and matchups, patch trends. Ranked, ARAM, Arena and URF, every region and rank. No proxy, no login. Export to Excel, CSV or API.",
    "version": "0.1",
    "x-build-id": "cXX1z4ArX7UpTs2oP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pshivam~opgg-league-of-legends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pshivam-opgg-league-of-legends-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/pshivam~opgg-league-of-legends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pshivam-opgg-league-of-legends-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/pshivam~opgg-league-of-legends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pshivam-opgg-league-of-legends-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": {
          "dataTypes": {
            "title": "What to get",
            "type": "array",
            "description": "Tier list: tier, rank, win, pick and ban rate of every champion in every lane. Builds: the most played items, boots, runes, skill orders and summoner spells. Matchups: win rate against every opponent. Trends: win, pick and ban rate by patch. Leave empty for the tier list.",
            "items": {
              "type": "string",
              "enum": [
                "tierList",
                "builds",
                "matchups",
                "trends"
              ],
              "enumTitles": [
                "Tier list (win, pick and ban rates)",
                "Builds (items, runes, skills, spells)",
                "Matchups and counters",
                "Patch trends"
              ]
            }
          },
          "mode": {
            "title": "Game mode",
            "enum": [
              "ranked",
              "aram",
              "arena",
              "urf"
            ],
            "type": "string",
            "description": "Ranked Solo/Duo has everything. ARAM, Arena and URF have the tier list only. URF is a limited-time mode: OP.GG shows the last patch it was played.",
            "default": "ranked"
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "One search per region. NA, EUW, EUNE, KR, BR, LAN, LAS, OCE, TR, RU, JP, SG, PH, TH, TW, VN, ME or global (all regions together). Leave empty for NA.",
            "items": {
              "type": "string",
              "enum": [
                "NA",
                "EUW",
                "EUNE",
                "KR",
                "BR",
                "LAN",
                "LAS",
                "OCE",
                "TR",
                "RU",
                "JP",
                "SG",
                "PH",
                "TH",
                "TW",
                "VN",
                "ME",
                "global"
              ]
            }
          },
          "tiers": {
            "title": "Ranks (ranked games)",
            "type": "array",
            "description": "One search per rank bracket: all, iron to challenger, or gold+, platinum+, emerald+, diamond+, master+ (that rank and above). Leave empty for emerald+.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "iron",
                "bronze",
                "silver",
                "gold",
                "platinum",
                "emerald",
                "diamond",
                "master",
                "grandmaster",
                "challenger",
                "gold_plus",
                "platinum_plus",
                "emerald_plus",
                "diamond_plus",
                "master_plus"
              ]
            }
          },
          "champions": {
            "title": "Champions",
            "type": "array",
            "description": "Only these champions: the name (Ahri, Kai'Sa, Wukong) or the champion ID. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "positions": {
            "title": "Lanes (ranked games)",
            "type": "array",
            "description": "Only these lanes: top, jungle, mid, adc or support. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "patch": {
            "title": "Patch",
            "type": "string",
            "description": "A patch such as 16.21 for older data. OP.GG keeps about the last ten patches; the answer lists the ones it has. Leave empty for the current patch."
          },
          "minGames": {
            "title": "Minimum games",
            "minimum": 0,
            "type": "integer",
            "description": "Skip champions and lanes with fewer games, and matchups with fewer games. 100 removes most noise.",
            "default": 0
          },
          "buildsPerType": {
            "title": "Builds per kind",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many of the most played options to return for each kind of build: starter items, boots, core items, late items, summoner spells, runes and skill orders.",
            "default": 3
          },
          "onlyNew": {
            "title": "Only new or changed records",
            "type": "boolean",
            "description": "Skip records that earlier runs of this same search already returned, so you pay only for changes: a champion that moved to another tier, a new patch, a new build. The first run works as usual and remembers what it returned, in your key-value store 'opgg-league-of-legends-scraper-only-new'.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Stop after this many records. You are charged per record.",
            "default": 5000
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Champion pages fetched at the same time (builds, matchups and trends).",
            "default": 4
          },
          "secondsBetweenRequests": {
            "title": "Seconds between requests",
            "minimum": 0.05,
            "maximum": 60,
            "type": "number",
            "description": "Pause between requests to OP.GG. After a 'too many requests' answer the Actor doubles the pause for the rest of the run.",
            "default": 0.2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}