{
  "openapi": "3.0.1",
  "info": {
    "title": "Yuyu-tei Scraper - Japanese TCG Singles Prices & Buylist",
    "description": "Scrape Yuyu-tei (yuyu-tei.jp), Japan's top TCG singles shop. Get JPY sell prices, buylist prices, rarity, card number, stock and condition for Pokemon, One Piece, Yu-Gi-Oh, Duel Masters, Weiss Schwarz and 20+ games. Search by keyword or scrape full sets by set code.",
    "version": "1.0",
    "x-build-id": "4tcE6XUbEr1xutwFD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lulzasaur~yuyutei-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lulzasaur-yuyutei-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/lulzasaur~yuyutei-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lulzasaur-yuyutei-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/lulzasaur~yuyutei-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lulzasaur-yuyutei-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": {
          "game": {
            "title": "Game",
            "enum": [
              "poc",
              "ygo",
              "yrd",
              "opc",
              "dm",
              "ws",
              "wsr",
              "vg",
              "bs",
              "digi",
              "ua",
              "wx",
              "hocg",
              "gcg",
              "fe",
              "sev",
              "lo",
              "zx",
              "pm",
              "re",
              "gab",
              "chaos",
              "xs",
              "ei",
              "supply"
            ],
            "type": "string",
            "description": "Yuyu-tei game section code. Common codes: poc = Pokemon, ygo = Yu-Gi-Oh OCG, yrd = Yu-Gi-Oh Rush Duel, opc = One Piece, dm = Duel Masters, ws = Weiss Schwarz, vg = Cardfight Vanguard, bs = Battle Spirits, digi = Digimon, ua = Union Arena, wx = WIXOSS, hocg = hololive OCG, gcg = Genshin, fe = Fire Emblem Cipher, sev = Shadowverse Evolve, lo = Lycee Overture, zx = Z/X, pm = Precious Memories, re = Rebirth, gab = Gundam Arsenal Base, chaos = ChaosTCG, xs = Build Divide, ei = Eternal Innocence, ws-r = others. Any code that exists at yuyu-tei.jp/top/<code> works.",
            "default": "poc"
          },
          "searchQueries": {
            "title": "Search Queries",
            "type": "array",
            "description": "Card names to search. IMPORTANT: Yuyu-tei is a Japanese-language site — use Japanese card names (e.g. ピカチュウ for Pikachu, リザードン for Charizard, ルフィ for Luffy). English/romaji terms usually return 0 results for Japanese games.",
            "default": [
              "ピカチュウ"
            ],
            "items": {
              "type": "string"
            }
          },
          "setCodes": {
            "title": "Set Codes (optional)",
            "type": "array",
            "description": "Scrape entire sets by Yuyu-tei set/version code instead of (or in addition to) keyword search — e.g. sv08a, sv10, m06 for Pokemon. Find codes in Yuyu-tei set list URLs: yuyu-tei.jp/sell/poc/s/<code>.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Price Mode",
            "enum": [
              "sell",
              "buy",
              "both"
            ],
            "type": "string",
            "description": "sell = store sell prices with stock; buy = buylist (kaitori) prices Yuyu-tei pays; both = merge sell + buylist prices into one record per card (2 requests per query).",
            "default": "both"
          },
          "includeDamaged": {
            "title": "Include damaged (kizu-ari) listings",
            "type": "boolean",
            "description": "Also scrape the discounted damaged/played (傷有り) sell inventory as extra records with condition = 'scratched'. Adds one request per query.",
            "default": false
          },
          "maxItems": {
            "title": "Max Items (total)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of card records to push across all queries and sets.",
            "default": 300
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Yuyu-tei returns 403 to datacenter IPs — residential proxy is required on the Apify platform (default).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}