# TCGplayer Scraper — Card Prices, History & Sales (`s-r/tcgplayer-scraper`) Actor

Collect TCGplayer card market prices, listed medians, buylist bids, SKU price history and recent sales for Pokémon, Magic, Yu-Gi-Oh, One Piece and more. Search by product line or supply product IDs and URLs.

- **URL**: https://apify.com/s-r/tcgplayer-scraper.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## TCGplayer Scraper: Card Prices, History and Recent Sales

TCGplayer Scraper collects trading card catalog data, current prices, SKU price history and recent sales. Search by card name and game, or supply product IDs and product URLs for a precise inventory lookup. Use the results to compare printings, follow condition-specific price changes, and inspect the prices buyers recently paid.

The actor covers TCGplayer product lines including Pokémon, Pokémon Japan, Magic: The Gathering, Yu-Gi-Oh, One Piece, Disney Lorcana, Digimon and Flesh and Blood. It returns source prices in USD. Each catalog product has a stable product ID that connects its history and sales rows to the same card or sealed product.

### TCGplayer Scraper input

Provide at least one non-empty `searchQueries`, `productIds` or `productUrls` array. Queries search the catalog; IDs and URLs select known products directly. When inputs are combined, explicit products are processed first, followed by search queries. The same product is delivered once even if several inputs find it.

For example, search for Charizard within Pokémon:

```json
{"searchQueries":["charizard"],"productLine":"pokemon","maxResults":50}
```

To request history and recent sales for the Base Set Charizard product:

```json
{"productIds":[42382],"includeHistory":true,"includeSales":true,"historyRange":"quarter"}
```

`productLine` takes a TCGplayer line slug such as `pokemon`, `magic`, `yugioh` or `one-piece-card-game`. The aliases `onepiece`, `lorcana`, `digimon`, `fleshandblood` and `starwars` also work. Unknown line values produce a validation error, which prevents a misspelling from silently searching every game.

`sortBy` accepts `bestMatch`, `priceHighLow`, `priceLowHigh` and `aToZ`. `maxResults` defaults to 50 and limits unique products across the whole run. History and sale rows are additional to that product count. Product IDs accept integers or decimal strings; product URLs must be HTTPS links to a TCGplayer product page.

### Output: products, printing prices and price observations

The dataset contains two row types, identified by `record_type` and `_type`. A `catalog_entry` describes one product. A `price_point` describes one history bucket or one recent sale, identified further by `kind` equal to `history` or `sale`. Join the rows using `entry_id`; every row also includes `source`, `platform`, `currency`, `fetched_at` and `row_id`.

Catalog rows include the title, product URL, image URL, game, set, rarity, card number, current market price, median price, lowest price, lowest price including shipping and listing count when available. Game-specific card attributes remain in `attributes`, so Magic card types and Pokémon attributes retain their original source meaning. The product position counts unique catalog entries, independently of the number of price observations.

`includePrices`, enabled by default, adds `printings` with market price, listed median and buylist market price per printing. The `skus` array identifies condition, variant and language combinations and includes available buylist high prices and market prices. A null buylist value means the source did not provide a bid; it is never converted to a zero-dollar offer.

### Price history by condition, variant and language

Enable `includeHistory` to receive one history row for each SKU and bucket with an available market price. `historyRange` supports `month`, `quarter`, `semi-annual` and `annual`. These correspond to daily, three-day and weekly buckets. History rows contain the bucket start and end dates, condition, variant, language, quantity sold, transaction count, sale-price extrema and totals over the selected range.

History can produce many more rows than a catalog search. For example, the captured Base Set Charizard quarter response contains five SKU series with thirty buckets each, giving 150 history observations. Empty sales buckets can still have a market price. Their quantity and transaction counts remain zero, while unavailable sale-price extrema are null.

### Recent sales and source limitations

Enable `includeSales` to collect recent transactions for the product's SKU conditions: Near Mint, Lightly Played, Moderately Played, Heavily Played, Damaged or Unopened. Sealed products use Unopened. Without SKU details, all six conditions are checked. The source exposes at most five anonymous sales per condition, and output is limited to 25 sale rows per product. `maxSalesPerProduct` sets a smaller output limit if desired. Availability varies by product, and the actor cannot provide a complete transaction ledger or unlimited sales history.

A sale row includes `price` per individual card, `quantity`, `shipping_price`, the full `sold_at` timestamp and its calendar `date`, plus condition, variant, language and the listing title. The source supplies no stable transaction ID. Separate source transactions remain separate rows even when their visible values match. The source also supplies no GTIN for these catalog entries.

### Pricing and usage

The actor separates delivered products, history buckets and recent sales into the `product`, `history` and `sale` events. Each event counts its own delivered rows. Consult the actor's Pricing tab for the current event rates before running a large history request. A product limit counts cards or sealed products; it does not cap the additional history and sale observations.

An empty result produces no result events. Non-paying accounts have a delivery cap of ten dataset rows per run. Mixed runs share that cap across catalog, history and sale rows. Requested rows beyond that cap require a paying account. Run summaries report delivered counts and warnings when a requested source phase is unavailable.

### FAQ

#### Can I collect Pokémon and Magic prices in one run?

Yes. Provide product IDs or URLs from both games, or omit the product line filter when searching across games. Use the product line field on each catalog row to group the results afterward.

#### Does a missing price mean the card is worth zero?

No. Missing prices are null, and history buckets without a usable market price do not create a price observation. A zero shipping price on a sale does mean free shipping.

#### How do I connect history rows to the correct card?

Match `entry_id` to the catalog row. For history, use `sku_id`, condition, variant and language to select the series. The `date` and `date_end` fields describe the bucket interval.

#### Why are fewer than 25 recent sales returned?

Some conditions have fewer recent transactions, and some products have no sales available through this source. The five-per-condition source limit also applies to cards with multiple printings or languages. Warnings identify unavailable requested phases.

# Actor input Schema

## `searchQueries` (type: `array`):

Search terms. Provide at least one query, product ID or product URL.

## `productLine` (type: `string`):

TCGplayer product line slug. Aliases onepiece, lorcana, digimon, fleshandblood and starwars are accepted.

## `productIds` (type: `array`):

Positive TCGplayer product IDs, as integers or decimal strings. Duplicate IDs are processed once.

## `productUrls` (type: `array`):

HTTPS tcgplayer.com/product/ URLs. Products are identified by their numeric ID.

## `sortBy` (type: `string`):

Search sort order.

## `maxResults` (type: `integer`):

Maximum unique products across all IDs, URLs and search queries, including cursor continuations. Price rows are additional.

## `includePrices` (type: `boolean`):

Include printing market prices, listed medians and SKU buylist prices.

## `includeHistory` (type: `boolean`):

Emit one history price_point per SKU and price bucket. This can produce hundreds of rows per product.

## `historyRange` (type: `string`):

History range: month uses daily buckets, quarter three-day buckets, semi-annual and annual weekly buckets.

## `includeSales` (type: `boolean`):

Emit recent sales as price_point rows for the product's SKU conditions, including Unopened for sealed products. Without SKU details, all six conditions are queried.

## `maxSalesPerProduct` (type: `integer`):

Maximum sale rows per product. Anonymous source access exposes at most five sales per condition, up to 25 total.

## `cursor` (type: `string`):

Continuation token returned by the previous request. Resend with the original input; omit on the first request.

## Actor input object example

```json
{
  "productIds": [
    42382
  ],
  "sortBy": "bestMatch",
  "maxResults": 50,
  "includePrices": true,
  "includeHistory": false,
  "historyRange": "quarter",
  "includeSales": false,
  "maxSalesPerProduct": 25
}
```

# Actor output Schema

## `results` (type: `string`):

Results in the default dataset.

## `summary` (type: `string`):

Run delivery summary.

## `errors` (type: `string`):

Source errors.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "productIds": [
        42382
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/tcgplayer-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "productIds": [42382] }

# Run the Actor and wait for it to finish
run = client.actor("s-r/tcgplayer-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "productIds": [
    42382
  ]
}' |
apify call s-r/tcgplayer-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,s-r/tcgplayer-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/darMRT4cfJriymTAa/builds/aLd3TH9lWfJpJmudq/openapi.json
