{
  "openapi": "3.0.1",
  "info": {
    "title": "TCGplayer Listings Scraper",
    "description": "Scrape every seller listing for any TCGplayer card - price, shipping, condition, printing, language, and seller, compared with market price. Pokémon, Magic: The Gathering, Yu-Gi-Oh!, One Piece, Lorcana, and more. Filter, batch up to 100 cards, and add Fair Value Analysis.",
    "version": "0.1",
    "x-build-id": "dVvQjuLjFVniZBx7o"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/phantom_coder~tcgplayer-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-phantom_coder-tcgplayer-listings-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/phantom_coder~tcgplayer-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-phantom_coder-tcgplayer-listings-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/phantom_coder~tcgplayer-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-phantom_coder-tcgplayer-listings-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": {
          "productUrls": {
            "title": "TCGplayer product URLs",
            "type": "array",
            "description": "TCGplayer product page URLs (for example https://www.tcgplayer.com/product/487805/...) or bare product IDs. Up to 100 products per run.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "Card names to search for on TCGplayer, for example \"charizard ex\". Each search adds its top results to the run.",
            "items": {
              "type": "string"
            }
          },
          "game": {
            "title": "Game",
            "enum": [
              "any",
              "pokemon",
              "pokemon-japan",
              "magic",
              "yugioh",
              "one-piece",
              "lorcana",
              "flesh-and-blood",
              "digimon",
              "dragon-ball-fusion-world",
              "star-wars-unlimited",
              "riftbound",
              "gundam",
              "union-arena",
              "weiss-schwarz",
              "cardfight-vanguard",
              "grand-archive",
              "sorcery",
              "final-fantasy"
            ],
            "type": "string",
            "description": "Limit search results to one game. Applies to search terms only, not to product URLs.",
            "default": "any"
          },
          "maxProductsPerQuery": {
            "title": "Max products per search term",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many of the top search results to scrape for each search term.",
            "default": 5
          },
          "maxListingsPerProduct": {
            "title": "Max listings per product",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of seller listings to return for each product, cheapest first.",
            "default": 10
          },
          "minCondition": {
            "title": "Minimum condition",
            "enum": [
              "any",
              "Near Mint",
              "Lightly Played",
              "Moderately Played",
              "Heavily Played",
              "Damaged"
            ],
            "type": "string",
            "description": "Only return listings in this condition or better.",
            "default": "any"
          },
          "printings": {
            "title": "Printings",
            "type": "array",
            "description": "Only return listings with one of these printings, for example Normal, Foil, Holofoil, Reverse Holofoil, 1st Edition, or Unlimited. Names depend on the game. Leave empty for all printings.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Only return listings in one of these languages. Leave empty for all languages.",
            "items": {
              "type": "string",
              "enum": [
                "English",
                "Japanese",
                "Chinese (S)",
                "Chinese (T)",
                "Korean",
                "French",
                "German",
                "Italian",
                "Portuguese",
                "Russian",
                "Spanish"
              ],
              "enumTitles": [
                "English",
                "Japanese",
                "Chinese (Simplified)",
                "Chinese (Traditional)",
                "Korean",
                "French",
                "German",
                "Italian",
                "Portuguese",
                "Russian",
                "Spanish"
              ]
            }
          },
          "minPrice": {
            "title": "Min price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only return listings at or above this item price in USD, excluding shipping."
          },
          "maxPrice": {
            "title": "Max price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only return listings at or below this item price in USD, excluding shipping."
          },
          "goldSellersOnly": {
            "title": "Gold Star sellers only",
            "type": "boolean",
            "description": "Only return listings from TCGplayer Gold Star sellers.",
            "default": false
          },
          "verifiedSellersOnly": {
            "title": "Verified sellers only",
            "type": "boolean",
            "description": "Only return listings from TCGplayer verified sellers.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "priceWithShipping",
              "price"
            ],
            "type": "string",
            "description": "Listings are returned cheapest first. Choose whether shipping counts toward the price.",
            "default": "priceWithShipping"
          },
          "includeRecentSales": {
            "title": "💰 Include recent sales ($)",
            "type": "boolean",
            "description": "Attach the latest completed sales (up to 5) to each product's listings.",
            "default": false
          },
          "enableFairValue": {
            "title": "💎 Enable Fair Value Analysis ($)",
            "type": "boolean",
            "description": "Attach an AI-powered fair value estimate and grading data to each covered card's listings.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}