# TCGplayer Search API Documentation

<p>Search public TCGplayer products. Filter by product line and set, paginate with page and size (1 to 50). Each item has an id, name, set, number, rarity, full-size image and market, low and median prices as numbers with USD. The id passes unchanged to the product and price-history routes. One credit per successful request; a failed request is never billed.</p>

- **Documentation:** [https://scrappa.co/docs/tcgplayer-api/tcgplayer_search](https://scrappa.co/docs/tcgplayer-api/tcgplayer_search)
- **API group:** TCGplayer API
- **Endpoint:** `GET https://scrappa.co/api/tcgplayer/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Search words, for example charizard. |
| `product_line` | string | No | pokemon, magic, yugioh, lorcana-tcg, one-piece-card-game, digimon-card-game, flesh-and-blood-tcg or star-wars-unlimited. |
| `set` | string | No | Set name from the product line. |
| `page` | integer | No | Page number, 1 to 50. |
| `size` | integer | No | Products per page, 1 to 50. |

## Example response

```json
{
    "data": {
        "items": [
            {
                "id": "42382",
                "set": "Base Set",
                "name": "Charizard",
                "number": "004/102",
                "prices": {
                    "low": {
                        "amount": 99,
                        "currency": "USD"
                    },
                    "market": {
                        "amount": 1001.05,
                        "currency": "USD"
                    }
                },
                "rarity": "Holo Rare",
                "image_url": "https://tcgplayer-cdn.tcgplayer.com/product/42382_in_1000x1000.jpg"
            }
        ],
        "query": "charizard",
        "pagination": {
            "page": 1,
            "total": 480,
            "has_more": true,
            "page_size": 20,
            "page_count": 24
        },
        "product_line": "pokemon"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. TCGplayer is not called and the request is not billed. |
| 503 | Upstream Unavailable | TCGplayer did not answer. Not billed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
