Skip to documentation
DOCUMENTATIONAPI referenceCardsIdentify from image
CARDS / V1

Identify from image

Send a card photo as a data URL. OCR suggests a query and returns ranked matches when enough text is readable.

POST/v1/identify-image
Bearer key requiredJSON response

PNG, JPEG, and WebP data URLs up to 6 MB are accepted. OCR is best effort; image bytes are not retained by this service.

Example requestv1
curl --request POST \  --url 'https://pokepos-market-api.vercel.app/v1/identify-image' \  --header 'Authorization: Bearer YOUR_API_KEY' \  --header 'Content-Type: application/json' \  --data '{"imageDataUrl":"data:image/png;base64,<BASE64_IMAGE>","setHint":"30th Celebration"}'
Response illustrative JSON
{  "ocr": {    "text": "Mew ex 066/128",    "confidence": 0.86,    "suggested": {      "name": "Mew ex",      "cardNumber": "066/128",      "query": "Mew ex 066/128"    }  },  "identification": {    "query": "Mew ex 066/128",    "candidates": [      {        "productId": 716465,        "name": "Mew ex - 066/128",        "matchScore": 440      }    ]  }}
Example values can change with the source.
REQUEST

JSON body

Send this object with Content-Type: application/json.

imageDataUrlstringrequired

Complete data:image/...;base64,... URL, not raw base64.

setHintstring

Value returned by the market data source.

RESPONSE

Response object

OCR text, editable suggestion, and optional catalog matches. The root schema is ImageIdentifyResult.

ocrobject

Text and confidence extracted from the card photo.

identificationIdentifyResult | null

Candidate lookup from the suggested query, if available.

SCHEMAS

Related objects

Expand a type to inspect its fields.

IdentifyResult8 fields
sourcestring

Name of the market data source.

querystring

Original or normalized search text.

parsedobject

Name, number, and set hint parsed from the card query.

matchedSetSet | null

Set matched from the optional hint, if any.

searchedCountinteger

Number of products inspected while ranking matches.

totalSearchResultsinteger

Total catalog search hits before candidate ranking.

truncatedboolean

Whether candidate inspection stopped at its search cap.

candidatesProductSummary & object[]

Ranked exact-printing candidates.

Set3 fields
namestring

Display name from the source catalog.

slugstring

URL-safe identifier for a category or set.

countinteger

Number of catalog products in the set.

ProductSummary11 fields
productIdinteger

Numeric ID for the exact catalog product.

namestring

Display name from the source catalog.

categorystring | null

Product line or category for this result.

setNamestring | null

Value returned by the market data source.

setIdinteger | null

Value returned by the market data source.

cardNumberstring | null

Collector number printed on the card.

raritystring | null

Rarity label reported by the catalog.

sealedboolean

Whether the product is sealed rather than a single card.

marketPricenumber | null

US dollars. Null means no observation is available.

lowestPricenumber | null

US dollars. Null means no observation is available.

listingCountinteger | null

Number of current listings, when reported.

HTTP

Status codes

200

OCR text, editable suggestion, and optional catalog matches.

400

Invalid parameter or request body.

502

An upstream market source is unavailable.

Errors use the error.code and error.message shape. Keep the x-request-id response header for support and tracing.