# TCG Product Finder — Search Card Names and Product IDs (`dmbsync/tcg-product-finder`) Actor

Find TCGplayer product IDs by product name, game and set. One search returns matching products together, ready to use with card-price tools.

- **URL**: https://apify.com/dmbsync/tcg-product-finder.md
- **Developed by:** [TCGAPIs](https://apify.com/dmbsync) (community)
- **Categories:** E-commerce, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 searches

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

## TCG Product Finder — Names to Product IDs

Find TCGplayer product IDs when you know a card or product name but not its ID. A single Actor run retrieves every page for the search and returns the matches together. You do not pay per candidate or per page.

### Input

```json
{"q":"Pikachu","game":"Pokemon","type":"single"}
```

Use `q` for the name or partial name. `game` is an optional game name or category ID; `set` is an optional exact expansion name or group ID. `type` can be `all`, `single` or `sealed`. Without a game filter, catalogue categories can include non-game products.

### All matches in one search

The Actor automatically fetches backend pages of up to 100 matches. It writes **one dataset row containing the complete search result**, not one billable row per candidate. `matches` contains names, product IDs, game/set identifiers, collector numbers, rarity, images and product type where supplied. `productIds` is a deduplicated list ready for a pricing workflow. The Output tab also links to all matching products as JSON or flat CSV, and to the product-ID array by itself.

Matching uses the backend's first successful strategy: all words, prefix, any words or partial name. `matchType` identifies which strategy won. “All matches” means all results for that strategy and your filters, not every possible fuzzy spelling. A match is not confirmation of a specific printing. Check the name, set, number and image before choosing IDs.

Safety limits are explicit and operator-controlled: at most 5,000 matches, 50 pages, 120 seconds of search work and an 8 MB aggregate output size including ID lists and pricing batches. There is no user-set result limit: the Actor retrieves all matches whenever they fit those safety limits. If a limit, changing dataset or upstream error prevents completion, `complete` is false and `truncated`/`truncationReason`/`error` explain what happened. **Incomplete, failed and zero-match searches have no search-result charge.** A separately listed Actor start fee may still apply.

### Pricing and next step

The `search-result` event is charged once for a completed, non-empty search, regardless of how many matches were returned. Its configured price is shown in the Pricing tab. Automatic dataset-item billing is disabled. Free Apify users have the same per-search result limits.

Use the returned `pricingActorInput` with [TCG Card Prices and Historical Data](https://apify.com/dmbsync/tcg-card-prices-history). Searches over 1,000 IDs supply explicit `pricingActorInputs` batches, because the pricing Actor accepts up to 1,000 IDs per run. Review the candidates first; pricing every candidate may be unnecessary.

### Reliability and privacy

No API key or separate login is required. The Actor calls a fixed, managed catalogue endpoint; it accepts no arbitrary URLs and returns no credentials. Source timestamps are preserved where available; `fetchedAt` is preparation time. Data availability varies. TCGAPIs is independent and not affiliated with or endorsed by TCGplayer.

Completed results are checkpointed. An ambiguous delivery or billing response stops the run rather than risking a duplicate charge; keyed results remain in the run's store for inspection. A new run is a new search and delivery.

# Actor input Schema

## `q` (type: `string`):

Name or partial name. Results are candidates; verify the set, number and printing.

## `game` (type: `string`):

For example Pokemon or 3. Omit to search all catalogue categories.

## `set` (type: `string`):

Exact expansion name or numeric group ID. Helps distinguish printings.

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

Search all products, only single cards, or only sealed products.

## Actor input object example

```json
{
  "q": "Pikachu",
  "type": "all"
}
```

# Actor output Schema

## `matches` (type: `string`):

No description

## `output` (type: `string`):

No description

## `products` (type: `string`):

No description

## `productIds` (type: `string`):

No description

## `csv` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("dmbsync/tcg-product-finder").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("dmbsync/tcg-product-finder").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 '{}' |
apify call dmbsync/tcg-product-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dmbsync/tcg-product-finder"
        }
    }
}
```

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/5FNaM4XiHhXdZxbgo/builds/Mo7l8bFc987jItEDS/openapi.json
