{
  "openapi": "3.0.1",
  "info": {
    "title": "TCGPlayer Listings Scraper — Prices, Sellers & Market Data",
    "description": "Scrape TCGPlayer listings by keyword, product URL, or seller shop — a TCGPlayer API alternative for US TCG shops. Export market price, seller offers, condition, shipping, and optional recent sales as JSON.",
    "version": "1.0",
    "x-build-id": "RSMiUrwM7XwFcobQc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~tcgplayer-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-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/crawloop~tcgplayer-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-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/crawloop~tcgplayer-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-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": {
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "TCGPlayer product search queries (e.g. charizard, black lotus). Each keyword finds matching products, then seller listings on those SKUs. Results are merged and deduplicated by listing ID.",
            "items": {
              "type": "string"
            }
          },
          "sellerNames": {
            "title": "Seller names",
            "type": "array",
            "description": "Walk each TCGPlayer seller shop (store name as shown on listings, e.g. ProSoul Games). Optional shopQuery keeps only matching card names.",
            "items": {
              "type": "string"
            }
          },
          "shopQuery": {
            "title": "Shop name filter",
            "type": "string",
            "description": "When walking seller shops (names or seller URLs), only keep products matching this query. Leave empty for full inventory. Does not apply to marketplace keyword search."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "TCGPlayer product, search, or seller URLs. Product pages scrape seller listings. Search URLs parse q + game. seller= / sellerfeedback URLs walk that shop.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "productLine": {
            "title": "Game / product line",
            "enum": [
              "all",
              "pokemon",
              "magic",
              "yugioh",
              "lorcana",
              "one-piece-card-game",
              "flesh-and-blood-tcg",
              "digimon-card-game",
              "star-wars-unlimited",
              "pokemon-japan"
            ],
            "type": "string",
            "description": "Limit keyword search and seller shops to one TCGPlayer catalog. Ignored when a start URL already includes /search/{line}/product.",
            "default": "all"
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "any",
              "Near Mint",
              "Lightly Played",
              "Moderately Played",
              "Heavily Played",
              "Damaged",
              "Unopened"
            ],
            "type": "string",
            "description": "Keep only this TCGPlayer condition.",
            "default": "any"
          },
          "printing": {
            "title": "Printing",
            "enum": [
              "any",
              "Normal",
              "Holofoil",
              "Reverse Holofoil",
              "1st Edition",
              "Unlimited"
            ],
            "type": "string",
            "description": "Keep only this finish (Normal, Holofoil, Reverse Holofoil, …).",
            "default": "any"
          },
          "language": {
            "title": "Language",
            "enum": [
              "any",
              "English",
              "Japanese",
              "Chinese",
              "Korean",
              "German",
              "French",
              "Italian",
              "Spanish",
              "Portuguese"
            ],
            "type": "string",
            "description": "Keep only this print language.",
            "default": "any"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "best_match",
              "best_selling",
              "price_asc",
              "price_desc",
              "name_asc"
            ],
            "type": "string",
            "description": "TCGPlayer sort for keyword search. Product listing tables stay in site price order.",
            "default": "best_match"
          },
          "minPrice": {
            "title": "Min price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Drop listings cheaper than this USD amount."
          },
          "maxPrice": {
            "title": "Max price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Drop listings more expensive than this USD amount."
          },
          "listingsPerProduct": {
            "title": "Max listings per product",
            "minimum": 0,
            "type": "integer",
            "description": "Cap seller offers fetched per product during keyword search (0 = all listings, subject to maxItems / maxPages). Product URLs always paginate listings. Use 5–10 for cheap discovery; 0 for a full offer book.",
            "default": 10
          },
          "includeSalesHistory": {
            "title": "Include recent sales",
            "type": "boolean",
            "description": "One extra marketplace call per product for latest completed sales. Adds lastSalePrice / lastSaleDate and a compact recentSales array. Off by default.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum listing rows to collect across all keywords, shops, and URLs. 0 = unlimited (subject to maxPages).",
            "default": 100
          },
          "maxPages": {
            "title": "Max pages per product / shop / search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety cap on pagination. Search returns ~24 products per page; product listings ~20 offers per page.",
            "default": 20
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "On a schedule, push and charge only listing IDs not seen in a previous run. First run delivers the full match set (baseline). Pair with an Apify Schedule and a stable monitorStoreName.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named Key-Value store for seen listing IDs across scheduled runs. Use a distinct name per watch (e.g. charizard-nm vs shop-prosoul).",
            "default": "tcgplayer-listings-monitor"
          },
          "resetMonitorState": {
            "title": "Reset monitor state",
            "type": "boolean",
            "description": "Clear the seen-ID cache before this run (next run becomes a new baseline).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Recommended on Apify: RESIDENTIAL. Local runs can leave proxy off — marketplace JSON often works directly.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}