{
  "openapi": "3.0.1",
  "info": {
    "title": "TCGplayer Scraper - Card Prices & Price History",
    "description": "Scrape TCGplayer card prices for Pokemon, Magic, Yu-Gi-Oh!, One Piece, Lorcana and more: market, lowest and median price, price by condition and printing, listings count, set, rarity and optional price history with sales. Search or product URLs. Pay per card.",
    "version": "0.1",
    "x-build-id": "8vCpm8uu7hV6aKYC1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~tcgplayer-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-tcgplayer-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/scrapewise~tcgplayer-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-tcgplayer-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/scrapewise~tcgplayer-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-tcgplayer-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "products",
              "priceHistory"
            ],
            "type": "string",
            "description": "Search returns one row per product with market and lowest price. Product details opens each product link or ID and adds median price, price per printing (Normal/Foil) and price per condition. Price history returns the dated market price and sales series for each printing and condition, for the products you search or paste. When empty, the Actor uses Search, or Product details if you only paste products."
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Card or product names, one per line (for example \"charizard\", \"black lotus\", \"blue-eyes white dragon\", \"booster box\"). Each term is searched separately. Leave empty and pick a game or set to browse it. Also accepts 'queries', 'searchQuery', 'query' or 'q' from other TCGplayer scrapers.",
            "items": {
              "type": "string"
            }
          },
          "game": {
            "title": "Game (product line)",
            "type": "string",
            "description": "Limit the search to one game: pokemon, magic, yugioh, one-piece-card-game, lorcana-tcg, flesh-and-blood-tcg, digimon-card-game, star-wars-unlimited, pokemon-japan... Short names like mtg, onepiece or lorcana also work. Leave empty to search every game. 'category' and 'productLine' also work."
          },
          "setName": {
            "title": "Set / expansion (optional)",
            "type": "string",
            "description": "Only products from this set, by name or part of it (for example \"Base Set\", \"151\", \"Obsidian Flames\", \"Revised Edition\"). Works with or without a search term."
          },
          "rarity": {
            "title": "Rarity (optional)",
            "type": "array",
            "description": "Only these rarities, as TCGplayer names them (for example \"Special Illustration Rare\", \"Mythic\", \"Secret Rare\"). 'rarityFilter' also works.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum market price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only products with a TCGplayer market price at or above this."
          },
          "maxPrice": {
            "title": "Maximum market price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only products with a TCGplayer market price at or below this."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "bestMatch",
              "bestSelling",
              "priceHighLow",
              "priceLowHigh",
              "aToZ"
            ],
            "type": "string",
            "description": "Order of the search results, as on TCGplayer. 'sortOption' values like \"Best Selling\" or \"Price: High to Low\" also work."
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of unique products in this run, across all search terms and links. You pay per product delivered. 'maxResults' and 'limit' also work.",
            "default": 30
          },
          "maxItemsPerQuery": {
            "title": "Maximum products per search term (optional)",
            "minimum": 1,
            "type": "integer",
            "description": "Cap for each term, so one term does not use the whole 'Maximum products'."
          },
          "includeDetails": {
            "title": "Include price by printing and condition",
            "type": "boolean",
            "description": "In Search mode, also open each product and add median price, sellers count, Normal/Foil market and listed median prices, buylist market price and the market price and 30-day sales for each condition (Near Mint to Damaged). Always on in Product details mode. No extra charge.",
            "default": false
          },
          "includePriceHistory": {
            "title": "Include price history",
            "type": "boolean",
            "description": "Also add price history rows (type 'priceHistory') for each product found. Charged as a separate event per product with history. Price history mode does this without the product rows.",
            "default": false
          },
          "historyRange": {
            "title": "History period",
            "enum": [
              "month",
              "quarter",
              "semi-annual",
              "annual"
            ],
            "type": "string",
            "description": "Period of the price history series.",
            "default": "quarter"
          },
          "productUrls": {
            "title": "Product links or IDs",
            "type": "array",
            "description": "TCGplayer product pages (https://www.tcgplayer.com/product/42382/pokemon-base-set-charizard) or numeric product IDs from a previous run ('productId'). Used by Product details and Price history modes.",
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy works for TCGplayer. Change only if you see BLOCKED rows."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}