{
  "openapi": "3.0.1",
  "info": {
    "title": "TCGplayer Price Scraper - Cards, Sales & Listings",
    "description": "Scrape TCGplayer prices for Pokemon, Magic, Yu-Gi-Oh!, One Piece, Lorcana and 50+ games: market, lowest and median price, per-printing prices, latest sales, cheapest seller listings and price history. Search by name, game, set or product type, or paste product URLs.",
    "version": "0.1",
    "x-build-id": "vJnq45OZA5eLoEV8Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fanndev~tcgplayer-price-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fanndev-tcgplayer-price-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/fanndev~tcgplayer-price-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fanndev-tcgplayer-price-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/fanndev~tcgplayer-price-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fanndev-tcgplayer-price-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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Card or product names to search, e.g. 'charizard' or 'black lotus'. One search per query. Leave empty and use the filters below to list a whole game, set or product type.",
            "items": {
              "type": "string"
            }
          },
          "productLines": {
            "title": "Games",
            "type": "array",
            "description": "Limit results to these games, by name or slug: pokemon, pokemon-japan, magic, yugioh, one-piece-card-game, lorcana-tcg, digimon-card-game, dragon-ball-super-ccg, star-wars-unlimited, flesh-and-blood-tcg, weiss-schwarz and any other game TCGplayer sells.",
            "items": {
              "type": "string"
            }
          },
          "sets": {
            "title": "Sets",
            "type": "array",
            "description": "Limit results to these sets, by the name shown on TCGplayer (e.g. 'Base Set', 'SV: Scarlet & Violet 151') or the slug from its URL (e.g. 'base-set').",
            "items": {
              "type": "string"
            }
          },
          "productTypes": {
            "title": "Product types",
            "type": "array",
            "description": "Limit results to these product types, e.g. 'Cards' for singles or 'Sealed Products' for booster boxes, packs and tins.",
            "items": {
              "type": "string"
            }
          },
          "productUrls": {
            "title": "Product or search URLs",
            "type": "array",
            "description": "TCGplayer product pages (https://www.tcgplayer.com/product/42382/...), bare product ids, or search pages (https://www.tcgplayer.com/search/pokemon/base-set?q=charizard). Search page filters are kept.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "best-selling",
              "price-high",
              "price-low",
              "lowest-listing-high",
              "lowest-listing-low",
              "newest",
              "oldest",
              "name"
            ],
            "type": "string",
            "description": "Order of search results.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Max products per search",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum products to save for each search. 0 = as many as TCGplayer serves (up to 9,990 per search; add game/set filters to reach more).",
            "default": 100
          },
          "includePricePoints": {
            "title": "Include prices per printing",
            "type": "boolean",
            "description": "Adds market price, listed median and buylist market price for each printing (Normal, Foil/Holofoil...).",
            "default": false
          },
          "includeLatestSales": {
            "title": "Include latest sales",
            "type": "boolean",
            "description": "Adds the 5 most recent completed sales: date, condition, printing, language, quantity, price paid and shipping.",
            "default": false
          },
          "maxListingsPerProduct": {
            "title": "Active listings per product",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Adds the cheapest N live seller listings (price incl. shipping) with seller, condition, printing, language and quantity, plus listing counts by condition. 0 = off.",
            "default": 0
          },
          "priceHistoryRange": {
            "title": "Price history",
            "enum": [
              "",
              "month",
              "quarter",
              "semi-annual",
              "annual"
            ],
            "type": "string",
            "description": "Adds sales history per printing and condition: market price, units sold, transactions and low/high sale price per period.",
            "default": ""
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Products enriched in parallel when extras are on.",
            "default": 8
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Retries per request before giving up on it.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy. The default (datacenter) works for this site and costs least; switch to Residential only if a large run starts getting blocked.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}