Image Search

Get Card Details by Graded Card Image

Changed on

Extract grader and certificate number from a graded card image, then look up card details.

This endpoint uses AI vision to read the grading label from a card image, extracts the grading company (PSA, BGS, CGC, etc.) and certificate number, then returns certificate info and card details (without price history).

Same as /details-by-certs but accepts an image instead of certificate numbers.

Provide either image_url (public URL) or image_base64 (base64-encoded image).

Example curl:

curl -X POST -H "X-API-Key: your-api-key-here" \
     -H "Content-Type: application/json" \
     -d '{
       "image_url": "https://example.com/graded-card.jpg"
     }' \
     "https://api.cardhedger.com/v1/cards/details-by-cert-ocr"

Daily limit

This endpoint is capped at 2000 requests per day per API key.

The allowance is shared with /v1/cards/prices-by-cert-ocr — calls to either endpoint draw from the same daily pool. It resets at 00:00 UTC and applies on every subscription tier, because each request runs an AI vision model over your image.

Once the cap is reached the endpoint returns 429 until reset. The 429 response carries the quota state in its headers:

HeaderMeaning
X-RateLimit-LimitYour daily allowance
X-RateLimit-RemainingCalls left today (0 on a 429)
X-RateLimit-ResetUnix epoch seconds when the quota resets
Retry-AfterSeconds until the quota resets

Successful responses do not currently carry these headers, so track your own call count if you need to throttle before hitting the cap.

Contact sales if you need more capacity — support@cardhedger.com. Higher daily allowances are available for this endpoint.

Returns certificate info and card details (no price history).

Daily allowance of uncached lookups. The first time a certificate is looked up it needs a live call to our grading-data provider and draws on your account's daily allowance of such lookups; repeat lookups are served from cache and do not. See Rate limits in the API overview for your tier's allowance.

post/v1/cards/details-by-cert-ocr

Request

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

Request body

image_urlstring nullable

Public URL of the graded card image

image_base64string nullable

Base64-encoded image of the graded card (with or without data URI prefix)

Example request

{
  "image_url": "https://example.com/graded-card.jpg"
}

Response

Successful Response

card_sourcestring nullable

How the card was resolved: 'gemrate_id' for a direct GemRate ID -> CardHedge lookup, or 'card_match' when that lookup found nothing and the card was matched from the GemRate description via the AI card-match fallback. Null when no card was resolved. Cards resolved via 'card_match' have null 'category_group' and 'set_type' -- the matcher does not return those two fields.

match_confidencenumber nullable

AI match confidence (0-1) when 'card_source' is 'card_match'; null otherwise. Treat results derived from a low-confidence match with care.

errorstring nullable

Set to 'gemrate_daily_quota_exceeded' when this certificate needed an uncached GemRate lookup but the account's daily budget for such lookups was already spent (it resets at 00:00 UTC). The row then carries placeholder cert_info (grade 'Unknown') and no card; retry after the reset. Null for every other row.

Changes