{
  "openapi": "3.0.1",
  "info": {
    "title": "TCGplayer Market Scraper - Products, Listings, Price History",
    "description": "Search TCGplayer Marketplace by keyword, browse Pokemon or Magic sets, or fetch product detail by ID. Three views: products (name, set, rarity, market, low and median price), seller listings (price, shipping, condition), price history buckets (sales, quantity sold). No account or API key.",
    "version": "0.1",
    "x-build-id": "qBBaPfs7HHA8qgnXd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rl1987~tcgplayer-api-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rl1987-tcgplayer-api-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/rl1987~tcgplayer-api-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rl1987-tcgplayer-api-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/rl1987~tcgplayer-api-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rl1987-tcgplayer-api-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": "Scraping mode",
            "enum": [
              "search",
              "browse",
              "detail"
            ],
            "type": "string",
            "description": "What this run does. 'Search' runs one keyword query per entry and returns relevance-ranked products. 'Browse' returns every product in a category and/or set. 'Product detail' fetches one record per product id, optionally with its seller listings and its price history. Pick the mode first; only the fields in that mode's section are read.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Search mode. One product search per line, e.g. 'Charizard' or 'Black Lotus'. Results are relevance-ranked by TCGplayer's own 'sales_dismax' algorithm; there is no sort option because the API's sorted path drops the keyword filter (measured 2026-11-22: sorting q=Charizard by product name returned '151 Booster Bundle' first, 5/24 rows matching, against 24/24 unsorted). A keyword with no matches returns 0 rows and the status message says so.",
            "items": {
              "type": "string"
            }
          },
          "productLines": {
            "title": "Product lines",
            "type": "array",
            "description": "Browse mode. Game/category url names: 'pokemon', 'magic', 'yugioh', 'onepiece', 'lorcana', 'digimon'. The list is the app's own, from /v1/search/productLines. Product line and set filters combine, so 'pokemon' plus 'Base Set' returns Base Set cards only.",
            "items": {
              "type": "string"
            }
          },
          "setNames": {
            "title": "Set names",
            "type": "array",
            "description": "Browse mode. Exact set display names as TCGplayer spells them, e.g. 'Base Set', 'SWSH04: Vivid Voltage'. IMPORTANT: a set name TCGplayer does not recognise is IGNORED, not matched to nothing. Measured 2026-11-22: 'pokemon' + 'Nope Set That Does Not Exist' returned the whole Pokemon line (33,131 products, HTTP 200, a full billed page), where 'pokemon' + 'Base Set' returned 109. So a typo silently widens the run to a whole game instead of returning nothing - check the row count and the first rows of a browse before trusting it, and prefer this mode for enumerating a set you have spelled correctly.",
            "items": {
              "type": "string"
            }
          },
          "productIds": {
            "title": "Product IDs",
            "type": "array",
            "description": "Product detail mode. One TCGplayer product id per line, as a number: the id in a tcgplayer.com/product/<id> URL. Ids are checked before the first request, so a non-numeric entry fails the run with a message instead of midway through. An id TCGplayer does not know returns an empty body and produces no row (it is not billed).",
            "items": {
              "type": "string"
            }
          },
          "includeListings": {
            "title": "Also collect seller listings",
            "type": "boolean",
            "description": "Product detail mode. Adds one row per live seller listing for each product, cheapest-first including shipping: seller, condition, printing, language, price, shipping, quantity. Billed as its own 'listing-row' event, so this roughly multiplies the run's cost by the number of listings per product. Off, each product row still carries listingCount, lowestPrice and lowestPriceWithShipping (totalListings is null on product-detail rows; the live count is listingCount).",
            "default": true
          },
          "listingLanguages": {
            "title": "Listing languages",
            "type": "array",
            "description": "Product detail mode, listings only. Languages to keep, defaulting to English. 'Japanese' narrows a card's listings to its Japanese printing. Ignored unless 'Also collect seller listings' is on.",
            "items": {
              "type": "string"
            }
          },
          "maxListingPages": {
            "title": "Max listing pages per product",
            "minimum": 1,
            "type": "integer",
            "description": "Product detail mode, listings only. Pages of 24 listings per product. 1 (default) is the first page of cheapest-with-shipping listings, which is what the app itself shows; raise it only when you need the long tail. Each page's rows are billed per listing-row.",
            "default": 1
          },
          "includePriceHistory": {
            "title": "Also collect price history",
            "type": "boolean",
            "description": "Product detail mode. Adds one row per price bucket per SKU: market price, low and high sale price, quantity sold and transaction count for that bucket, plus the SKU's all-time totals. Billed as its own 'price-history-row' event, so this roughly multiplies the run's cost by the number of buckets (up to 30 per SKU). Off, each product row still carries current price fields. SKUs with no sales yet come back with an empty bucket list and produce no rows.",
            "default": true
          },
          "priceHistoryRange": {
            "title": "Price history range",
            "enum": [
              "day",
              "week",
              "month",
              "quarter",
              "year"
            ],
            "type": "string",
            "description": "Product detail mode, price history only. Bucket width: 'day' gives daily buckets, 'quarter' (default) gives 30 buckets over roughly the last quarter. Each bucket is one row and one charge, so a wider range with narrower buckets costs more.",
            "default": "quarter"
          },
          "shippingCountry": {
            "title": "Shipping country",
            "type": "string",
            "description": "All modes. Two-letter ISO country code, default US. It decides which sellers' shipping cost is priced, so it changes lowestPriceWithShipping and the listing order - a card that is $0.50 to ship in the US may be $12 to ship to NL. It does not filter which products are returned.",
            "default": "US"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows have been DELIVERED across all record types (0 = no limit). Counted by the billing ledger after de-duplication, so it is a limit on what you receive and pay for, not on what the target returned.",
            "default": 0
          },
          "maxPages": {
            "title": "Max pages per query",
            "minimum": 1,
            "type": "integer",
            "description": "Search and browse modes. Pages of 24 products per keyword or per browse filter; 1 (default) is the first page. Pagination stops early when the match count runs out, so a broad browse (all of Pokemon is ~33,000 products) needs this raised well above 1 to go deep - and each page is billed per product-row.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Max number of requests processed in parallel. TCGplayer answers this API anonymously and did not rate-limit a handful of parallel requests, but 5 is a polite default; raise it only if you see no 429s.",
            "default": 5
          },
          "maxRequestsPerCrawl": {
            "title": "Max requests per run",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on the total number of HTTP requests in the run, before billing is considered. 0 = unlimited. Useful with a wide browse as a backstop against a runaway pagination loop.",
            "default": 0
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "Retries per request before it is marked failed. Does NOT bound retries caused by a blocked or rate-limited status code (401/403/429) - see maxSessionRotations for that.",
            "default": 5
          },
          "maxSessionRotations": {
            "title": "Max session rotations",
            "minimum": 0,
            "type": "integer",
            "description": "How many times one request may be retried with a freshly rotated session and proxy after a blocked status code. Only matters when a proxy is configured; without one, a rotation reuses the same egress.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Off by default: TCGplayer serves this API anonymously and answered every endpoint from a plain datacenter IP during this build. Switch on Apify residential only if you start seeing 403s or challenge pages.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}