# OP.GG Scraper (`crawlerbros/opgg-scraper`) Actor

Scrape OP.GG - the #1 League of Legends statistics platform. Get champion tier lists, win/pick/ban rates by position and patch, and champion counters for all roles.

- **URL**: https://apify.com/crawlerbros/opgg-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Developer tools, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## OP.GG Champion Scraper

Extract League of Legends champion tier lists, win rates, pick rates, ban rates, and performance statistics from [op.gg](https://www.op.gg). Get up-to-date champion rankings by position with tier classifications from OP+ through D. No login or API key required.

### Features

- **Full Tier Lists** — Scrape all champions ranked by their current meta strength (OP+, OP, S+, S, A+, A, B, C, D)
- **Position Filtering** — Get champions specific to TOP, JUNGLE, MID, ADC, or SUPPORT roles
- **Win/Pick/Ban Rates** — Precise percentage statistics for each champion in each position
- **Patch Detection** — Auto-extracts the current patch version from champion image URLs
- **No Login Required** — Publicly available OP.GG data

### Use Cases

- League of Legends tier list aggregators and guides
- Esports analytics and meta tracking tools
- Champion recommendation engines
- Competitive analysis and draft preparation tools
- Content creation for League of Legends communities

### Input

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `mode` | Select | No | `tierList` | Scrape mode: `tierList` or `byPosition` |
| `position` | Select | No | `ALL` | Lane position: `ALL`, `TOP`, `JUNGLE`, `MID`, `ADC`, `SUPPORT` |
| `minTier` | Select | No | `all` | Minimum tier filter: `all`, `0` (OP+), `1` (OP), `2` (S+), `3` (S) |
| `maxItems` | Integer | No | `200` | Maximum champions to return (1–500) |

#### Example Input — Full Tier List

```json
{
  "mode": "tierList",
  "position": "ALL",
  "minTier": "all",
  "maxItems": 200
}
```

#### Example Input — S-Tier MID Champions

```json
{
  "mode": "byPosition",
  "position": "MID",
  "minTier": "3",
  "maxItems": 50
}
```

### Output

| Field | Type | Description |
|-------|------|-------------|
| `championName` | String | Champion display name (e.g., `Ahri`) |
| `championKey` | String | Internal champion key (e.g., `ahri`) |
| `position` | String | Lane position (e.g., `MID`) |
| `tier` | String | Tier classification (`OP+`, `OP`, `S+`, `S`, `A+`, `A`, `B`, `C`, `D`) |
| `tierRank` | Integer | Rank within the tier |
| `winRate` | Float | Win rate percentage (e.g., `51.23`) |
| `pickRate` | Float | Pick rate percentage |
| `banRate` | Float | Ban rate percentage |
| `patch` | String | Patch version (e.g., `16.12.1`) — omitted if unavailable |
| `imageUrl` | String | Champion image URL |
| `recordType` | String | Always `champion` |
| `scrapedAt` | String | ISO 8601 timestamp |
| `sourceUrl` | String | Source page URL |

#### Example Output

```json
{
  "championName": "Ahri",
  "championKey": "ahri",
  "position": "MID",
  "tier": "OP",
  "tierRank": 3,
  "winRate": 51.23,
  "pickRate": 8.57,
  "banRate": 3.12,
  "patch": "16.12.1",
  "recordType": "champion",
  "scrapedAt": "2025-01-15T10:23:45+00:00",
  "sourceUrl": "https://www.op.gg/champions?position=mid"
}
```

### FAQ

**Does this require an API key or login?**
No. All data is from publicly available OP.GG pages.

**What do the tier names mean?**
OP+ and OP are the strongest champions in the current meta. S+, S are excellent, A+, A are strong, B is average, C and D are below average.

**How current is the data?**
OP.GG updates statistics daily based on recent ranked game data. This scraper fetches live data each run.

**What is the `minTier` filter?**
Setting `minTier` to `3` (S) returns only OP+, OP, S+, and S-tier champions, filtering out lower-ranked ones.

**Can I get data for all positions at once?**
Yes — use `mode: tierList` with `position: ALL` to get the full cross-position tier list.

**What patch version is the data from?**
The `patch` field in each record shows the current game patch version automatically extracted from the page.

# Actor input Schema

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

What data to fetch.

## `position` (type: `string`):

Filter by role/position (mode=byPosition or optional filter for tierList).

## `minTier` (type: `string`):

Filter champions by minimum tier (lower number = better tier).

## `maxItems` (type: `integer`):

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "tierList",
  "position": "ALL",
  "minTier": "all",
  "maxItems": 100
}
```

# Actor output Schema

## `data` (type: `string`):

Dataset containing all scraped OP.GG Champions.

# 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 = {
    "mode": "tierList",
    "position": "ALL",
    "minTier": "all",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/opgg-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 = {
    "mode": "tierList",
    "position": "ALL",
    "minTier": "all",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/opgg-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 '{
  "mode": "tierList",
  "position": "ALL",
  "minTier": "all",
  "maxItems": 100
}' |
apify call crawlerbros/opgg-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlerbros/opgg-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/SDTRslWS61bZbQ2Vx/builds/MHC7OXNyb5BWScE7M/openapi.json
