Card Search

Search Cards with Sorting

Search for cards from the database with full-text search, filtering, sorting, and pagination.

⚠️ Required: At least one filter parameter (search, set, category, or player) is required.

Search Parameter:

  • search: Full-text fuzzy search across card description and player names
  • Supports multiple keywords: "Shohei Ohtani rookie" matches cards containing all terms

Filter Parameters (exact match):

  • player: Exact player name match (e.g., "Mike Trout")
  • set: Exact set name match (e.g., "2018 Panini Prizm Basketball")
  • category: Exact category match (e.g., "Baseball", "Pokemon", "Basketball")

Sorting Options:

  • sort_by:
    • "gain" - 7-day price change percentage
    • "gain_30day" - 30-day price change percentage
    • "sales_7day" - 7-day sales volume
    • "sales_30day" - 30-day sales volume
    • "sales" - alias for sales_30day (backwards compatible)
    • "price" - current price
    • "description" - alphabetical
  • sort_order: "asc" or "desc"

Other Options:

  • raw_images_only: When true, returns raw card images instead of graded slab images
  • page / page_size: Pagination controls (max 100 per page)

Response:

  • pages: Total pages available
  • count: Total matching cards
  • cards: Array of card objects including:
    • gain: 7-day price change percentage
    • gain_30day: 30-day price change percentage
    • 7 Day Sales / 30 Day Sales: Sales volume
    • prices: Array of grade/price pairs
post/v1/cards/search-cards-wsort

Request

  • Base URL
    https://api.cardhedger.com
  • Auth
    API key in header X-API-Key

Request body

searchstring nullable

Full-text search query for fuzzy matching on card description/player (e.g., 'Trout rookie')

setstring nullable

Filter by exact set name (e.g., '2024 Topps Chrome Baseball')

categorystring nullable

Filter by exact category (e.g., 'Baseball', 'Pokemon', 'Basketball')

playerstring nullable

Filter by exact player name (e.g., 'Mike Trout', 'Shohei Ohtani')

raw_images_onlyboolean nullable

Image preference. Omitted (default): return the raw card photo, falling back to the graded slab image only when no raw photo exists. true: force raw-only (no graded fallback). false: prefer the graded slab image.

sort_by'gain' | 'gain_30day' | 'sales' | 'sales_7day' | 'sales_30day' | 'price' | 'description'

Field to sort by: gain (7-day price change %), gain_30day (30-day price change %), sales_7day (7-day volume), sales_30day or sales (30-day volume), price (current price), description (alphabetical)

sort_order'asc' | 'desc'

Sort order: asc (ascending) or desc (descending)

pageinteger

Page number for pagination

page_sizeinteger

Number of results per page (1-100)

Response

Successful Response

pagesinteger

Total number of pages available

countinteger

Total number of matching cards

Example response

{
  "cards": [
    {
      "30 Day Sales": 187,
      "7 Day Sales": 45,
      "card_id": "1587446850514x224832321163624450",
      "category": "Baseball",
      "category_group": "Sports Cards",
      "description": "Shohei Ohtani 2024 Topps Chrome Baseball",
      "gain": 12.5,
      "gain_30day": 18.3,
      "image": "https://example.com/card.jpg",
      "number": "150",
      "player": "Shohei Ohtani",
      "prices": [
        {
          "grade": "PSA 10",
          "price": "850"
        },
        {
          "grade": "PSA 9",
          "price": "125"
        },
        {
          "grade": "Raw",
          "price": "45.99"
        }
      ],
      "rookie": false,
      "set": "2024 Topps Chrome Baseball",
      "set_type": "Topps Chrome Baseball",
      "stats_grade": "PSA 10",
      "variant": "Base"
    }
  ],
  "count": 742,
  "pages": 15
}

Changes

No recorded changes to this operation across all 14 revisions of this API.