{
  "openapi": "3.0.1",
  "info": {
    "title": "Yuyu-tei Scraper - Japan TCG Card Prices & Buylist (遊々亭)",
    "description": "Yuyu-tei scraper for Japanese trading card prices: sell price, stock and buy (kaitori) price of each single card on yuyu-tei.jp in one row, with spread and buy rate. Pokemon, Yu-Gi-Oh!, One Piece, Duel Masters and 20 more games. Card name, series or URL. Unofficial; not affiliated with Yuyu-tei.",
    "version": "0.1",
    "x-build-id": "UnFg9aWuoLfStl9Zq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~japan-tcg-yuyutei/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-japan-tcg-yuyutei",
        "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/jpopendata~japan-tcg-yuyutei/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-japan-tcg-yuyutei",
        "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/jpopendata~japan-tcg-yuyutei/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-japan-tcg-yuyutei",
        "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",
            "type": "string",
            "description": "Card game section of the shop, used for keywords and series (pasted URLs carry their own). Codes: poc (Pokemon), ygo (Yu-Gi-Oh! OCG), opc (One Piece), dm (Duel Masters), ws (Weiss Schwarz), ua (Union Arena), vg (Vanguard), digi (Digimon), yrd (Yu-Gi-Oh! Rush Duel), bs (Battle Spirits), wx (WIXOSS), hocg (hololive), gcg (Gundam Card Game), sev (Shadowverse: Evolve), wsr (Weiss Schwarz Rose), fe (Fire Emblem Cipher), zx (Z/X), lo (Lycee Overture), chaos (ChaosTCG), pm (Precious Memories), re (Rebirth for you), xs (Xross Stars), gab (Gundam Arsenal Base), ei (Eiketsu Taisen). English or Japanese names work too (\"pokemon\", \"遊戯王\", \"one piece\"). Magic: The Gathering is not sold by Yuyu-tei.",
            "default": "poc"
          },
          "keywords": {
            "title": "Card names (keywords)",
            "type": "array",
            "description": "Card names to search, one per line, in JAPANESE as the shop lists them, e.g. \"リザードンex\", \"ピカチュウ\", \"青眼の白龍\", \"ルフィ\". English names usually find nothing (\"Charizard\" 0 hits, \"リザードン\" many). Each keyword returns every matching card of the game (all printings and rarities) in one request per side. If keywords, series and startUrls are all empty, the Quick start keyword is used.",
            "default": [
              "リザードンex"
            ],
            "items": {
              "type": "string"
            }
          },
          "series": {
            "title": "Series / sets (収録弾, optional)",
            "type": "array",
            "description": "Optional. List every card of a series (expansion), one per line: the shop's series code from the series page URL (\"sv08a\" in https://yuyu-tei.jp/sell/poc/s/sv08a), the expansion code printed in its label (\"SV8a\"), a part of the series name (\"テラスタルフェス\") or the series URL. Resolved against the shop's own series list for the chosen game (one extra request); an unknown value stops the run with suggestions.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Yuyu-tei URLs (optional)",
            "type": "array",
            "description": "Optional. Paste yuyu-tei.jp URLs, one per line: a search result (https://yuyu-tei.jp/sell/poc/s/search?search_word=...), a series page (https://yuyu-tei.jp/buy/ygo/s/qccu) or a card page (https://yuyu-tei.jp/sell/poc/card/sv08a/10481 — tracks just that card; cards of one series share requests). /sell/ or /buy/ in the URL does not matter: \"mode\" decides which prices are read. Special lists (new, sale, ultra) and sealed products are not supported.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Prices to read",
            "type": "string",
            "description": "both (default) = sell price + buy price joined in one row per card, with spread and buy rate (2 requests per search); sell = sell prices and stock only; buy = buy (kaitori) prices only (1 request per search each).",
            "default": "both"
          },
          "includeDamaged": {
            "title": "Include damaged copies (傷有り)",
            "type": "boolean",
            "description": "Also read the shop's damaged-copy listing (傷有り / ダメージ品) for each search and store those copies as extra rows with condition = damaged (one more request per search). Sell side only.",
            "default": false
          },
          "rarities": {
            "title": "Rarities (optional)",
            "type": "array",
            "description": "Optional. Keep only these rarities, as the shop labels its sections, e.g. \"SAR\", \"SR\", \"UR\", \"AR\" (Pokemon) or \"QCSE\", \"UR\" (Yu-Gi-Oh!). Case-insensitive. Applied after fetching. Empty = all rarities.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "inStockOnly": {
            "title": "In-stock only",
            "type": "boolean",
            "description": "Keep only cards the shop can sell now (stock shown as a number above 0 or ◯). Applied after fetching; buy-only rows are dropped. Ignored with mode = buy.",
            "default": false
          },
          "maxItems": {
            "title": "Max records",
            "type": "integer",
            "description": "Maximum records stored for the whole run (1..100000; values outside are clamped). A broad card name such as \"ピカチュウ\" matches about 350 cards. Each stored record is charged.",
            "default": 100
          },
          "maxApiRequests": {
            "title": "Max upstream requests",
            "type": "integer",
            "description": "Hard budget of requests to yuyu-tei.jp for the whole run (0..2000). 0 (default) = automatic: exactly what the searches need (1 per side per search, plus 1 for a series list) plus a little headroom for retries. Requests are strictly serial, at least 2 s apart.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy settings. Default: Apify RESIDENTIAL proxies, country JP — yuyu-tei.jp refuses Apify datacenter IPs (HTTP 403, verified 2026-10-13; the same requests from a home connection are answered). One sticky session (one IP) is kept for the whole run, never rotation; only if the very first request is refused is it retried once on a fresh session.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "JP"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}