Collectibles Recognition

This page describes API of Collectibles Recognition service for images. With this service you can analyse photos of collectible items via AI. The API method first detect all collectible items on a photo and then recognizes their types (Stamp, Coin, Banknote, Comics, Card, Slab Label). For detected Cards (Trading Card Game or Sport Card) and Comics (Manga included), the service can identify name, set, series, card number, year of release and other fields. For some cards/games it also return IDs for TCG Player. It can also read information from the Slab Labels or get the prices of the collector items.

Endpoints

This service API has several api endpoints running at URLs, each of them are suitable for different use case and also are priced different:

https://api.ximilar.com/collectibles/v2/process       (for localization and tags)
https://api.ximilar.com/collectibles/v2/analyze       (for complete analysis)
https://api.ximilar.com/collectibles/v2/tcg_id        (for trading card games)
https://api.ximilar.com/collectibles/v2/sport_id      (for sport cards)
https://api.ximilar.com/collectibles/v2/comics_id     (for comics magazines & books & manga)
https://api.ximilar.com/collectibles/v2/card_ocr_id   (for OCR on cards)
https://api.ximilar.com/collectibles/v2/slab_id       (for graded slabs - complex analysis)
https://api.ximilar.com/collectibles/v2/detect        (for localization)
https://api.ximilar.com/collectibles/v2/slab_grade    (for graded slabs - simple analysis)

POST/v2/tcg_id

TCG Identification

Taxonomy

Given a list of image records, this method returns identification for largest Trading Card Game card that was detected on image. This service is able to further analyze and identify the trading card.

This service can identify cards from more than 15 games including Pokemon, Yugioh!, Magic The Gathering, OnePiece, Lorcana. The Full list is available on Taxonomy page. It is also able to recognize Alphabet/Language, and visual features like Holo/Foil, etc. If the input card is from one of mentioned games, then we are able to able to identify the card set, set_code, series, card_number, full_name, year of release and other fields. For some of these cards and games we have links to tcgplayer.com, scryfall.com and other sites. It can also detects and analyze the graded Slab Label (getting certificate number, grade value..).

Required attributes

  • Name
    records
    Type
    dict
    Description

    A batch of json records (max 10), one record is representation of an image and it's defined by _url or _base64.

Optional attributes

  • Name
    lang
    Type
    boolean
    Default
    Default:False
    Description

    Set true if you need to distinguish language of trading card in latin alphabet, otherwise take the language information from _tags.

  • Name
    slab_id
    Type
    boolean
    Default
    Default:False
    Description

    If set to true, then the slab identification will be done via OCR and AI, default False. This will analyse only one slab label on the image and also count additional API credits according to /v2/slab_id.

  • Name
    slab_grade
    Type
    boolean
    Default
    Default:False
    Description

    If set to true, then AI system will analyse the company and grade on the image, default False. This will also count additional API credits according to /v2/slab_grade.

  • Name
    analyze_all
    Type
    boolean
    Default
    Default:False
    Description

    If specified it will analyze all cards on image (only 1 record/image is allowed), the perfect use case is a card binder. The number of credits is per number of analysed cards on image instead of records (cards count * credit price of endpoint).

  • Name
    pricing
    Type
    boolean
    Default
    Default:False
    Description

    If set to true, then system will try to return the prices, default False. This will also count additional API credits according to pricing operation. The API credits will not be counted if the system return no prices.

Returns

HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed. Body of the response is a JSON object (map) with the following fields:

  • Name
    records
    Type
    dict
    Description

    JSON array with the input records, each record enriched by field _objects (of type Slab Label or Card). The main object contains _identification with necessary information of identified card.

  • Name
    status
    Type
    dict
    Description

    A JSON map/dictionary with a status of the method processing. It contains these subfields: code (numeric code of the operation status; it follows the concept of HTTP status codes) and text (text describing the status code).

Request

POST
/v2/tcg_id
curl https://api.ximilar.com/collectibles/v2/tcg_id -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
  "records": [
      {
        "_url": "__PATH_TO_IMAGE_URL__"
      }
  ],
  "slab_grade": true,
  "slab_id": true,
  "pricing": true
}'

Response

{
  "records": [
    {
      "_url": "https://images.ximilar.com/examples/demo/collectibles/pokemon.jpeg",
      "_status": { "code": 200, "text": "OK", "request_id": "80985c61-bc9b-49f2-9756-c09c926b015c"},
      "_id": "c945fbd1-b706-4e83-a4f2-4cc9ea967e1d",
      "_width": 389,
      "_height": 659,
      "Category": "Card/Trading Card Game",
      "_objects": [
        {
          "name": "Card",
          "id": "76fa9ec3-e0d9-408a-b582-55a1cd6712e0",
          "bound_box": [
            38,
            165,
            348,
            616
          ],
          "prob": 0.9330817461013794,
          "area": 0.5453850384823933,
          "Top Category": [
            {
              "id": "8ae26c4a-ae79-4c01-9b54-ac4e2b42e914",
              "name": "Card",
              "prob": 1.0
            }
          ],
          "_tags": {
            "Category": [
              {
                "name": "Card/Trading Card Game",
                "prob": 1.0,
                "id": "d44efa56-09c3-4829-b3e7-226fe9cfe798",
                "pre-filled": true
              }
            ],
            "Side": [
              {
                "prob": 0.99487,
                "name": "front",
                "id": "b48a23fe-381e-4a67-b649-9839e1f7d5a7"
              }
            ],
            "Subcategory": [
              {
                "prob": 0.99945,
                "name": "Pokemon",
                "id": "fdbb3942-b7e0-476a-8f13-af77aedd13e6"
              }
            ],
            "Foil/Holo": [
              {
                "prob": 0.99159,
                "name": "Foil/Holo",
                "id": "f8ade5be-18f3-49d2-aa76-2431a16bd3f7"
              }
            ],
            "Alphabet": [
              {
                "prob": 0.99615,
                "name": "latin",
                "id": "f0339837-aa0b-414f-acb8-d47d6ef3b7fa"
              }
            ]
          },
          "_tags_simple": [
            "Card/Trading Card Game",
            "front",
            "Pokemon",
            "Foil/Holo",
            "latin"
          ],
          "_identification": {
            "best_match": {
              "year": 2000,
              "full_name": "Dark Gyarados Team Rocket (RO) #8",
              "name": "Dark Gyarados",
              "set": "Team Rocket",
              "color": "Water",
              "type": "Pokemon",
              "set_code": "RO",
              "rarity": "Rare Holo",
              "out_of": "82",
              "card_number": "8",
              "series": "Classic",
              "subcategory": "Pokemon",
              "links": {
                "tcgplayer.com": "https://www.tcgplayer.com/product/84606",
                "ebay.com": "https://www.ebay.com/sch/i.html?_nkw=Pokemon+Dark+Gyarados+RO+%238&_sacat=2536"
              },
              "pricing": {
                "list": [
                  {
                    "item_id": "v1|116472483717|0",
                    "item_link": "https://www.ebay.com/itm/116472483717",
                    "name": "Dark Gyarados 8/82 Holo Team Rocket Prerelease Promo Pokemon Card -",
                    "price": 11.99,
                    "currency": "USD",
                    "country_code": "US",
                    "source": "eBay",
                    "date_of_creation": "2025-02-09",
                    "date_of_sale": null,
                    "grade_company": null,
                    "grade": null,
                    "version": "Foil/Holo",
                    "variation": null
                  },
                  {
                    "item_id": "v1|335803065051|0",
                    "item_link": "https://www.ebay.com/itm/335803065051",
                    "name": "2000 Pokemon Team Rocket Holo Dark Gyarados #8 0n5m",
                    "price": 40.5,
                    "currency": "USD",
                    "country_code": "US",
                    "source": "eBay",
                    "date_of_creation": "2025-02-08",
                    "date_of_sale": null,
                    "grade_company": null,
                    "grade": null,
                    "version": "Foil/Holo",
                    "variation": null
                  }
                ]
              }
            },
            "alternatives": [
              {
                "year": 2000,
                "full_name": "Dark Gyarados Team Rocket (RO) #25",
                "name": "Dark Gyarados",
                "set": "Team Rocket",
                "color": "Water",
                "type": "Pokemon",
                "set_code": "RO",
                "rarity": "Rare",
                "out_of": "82",
                "card_number": "25",
                "series": "Classic",
                "subcategory": "Pokemon",
                "links": {
                  "tcgplayer.com": "https://www.tcgplayer.com/product/84607",
                  "ebay.com": "https://www.ebay.com/sch/i.html?_nkw=Pokemon+Dark+Gyarados+RO+%2325&_sacat=2536"
                }
              },
              {
                "year": 2021,
                "full_name": "Dark Gyarados Celebrations (CEL) #8",
                "name": "Dark Gyarados",
                "set": "Celebrations",
                "color": "Water",
                "type": "Pokemon",
                "set_series_code": "Ann25thR",
                "set_code": "CEL",
                "rarity": "Ultra Rare",
                "out_of": "82",
                "card_number": "8",
                "series": "Sword & Shield",
                "subcategory": "Pokemon",
                "links": {
                  "tcgplayer.com": "https://www.tcgplayer.com/product/250294",
                  "ebay.com": "https://www.ebay.com/sch/i.html?_nkw=Pokemon+Dark+Gyarados+CEL+%238&_sacat=2536"
                }
              }
            ],
            "distances": [
              0.30719548,
              0.38173488,
              0.47646382
            ]
          }
        },
        {
          "name": "Slab Label",
          "id": "9242aeda-1a35-4c93-b75c-958af91e63a7",
          "bound_box": [
            31,
            22,
            375,
            130
          ],
          "prob": 0.763236403465271,
          "area": 0.14492629246618893,
          "Top Category": [
            {
              "id": "79425eda-c25b-48e3-a9de-0fe8303a4635",
              "name": "Slab Label",
              "prob": 1.0
            }
          ],
          "_tags": {
            "Company": [
              {
                "prob": 0.98724,
                "name": "PSA",
                "id": "2f4545e7-08e4-492b-ab4e-02a409d58988"
              }
            ],
            "Grade": [
              {
                "prob": 0.99235,
                "name": "9",
                "id": "5ae512e1-5296-4900-ac6d-3092b71d28e7"
              }
            ],
            "Side": [
              {
                "prob": 0.97328,
                "name": "front",
                "id": "6b41ebfc-cfbd-4f93-a9bf-bf54b357cafd"
              }
            ],
            "Graded": [
              {
                "prob": 0.9806,
                "name": "yes",
                "id": "9d7bf709-dfbc-4595-91be-a9d779b5f33c"
              }
            ]
          },
          "_tags_simple": [
            "PSA",
            "9",
            "front"
          ],
          "_identification": {
            "best_match": {
              "name": "DARK GYARADOS",
              "brand": "POKEMON",
              "verbal_grade": "Mint",
              "grade": "9",
              "year": null,
              "card_no": "#8",
              "certificate_number": "48658983",
              "lang": null,
              "set": "ROCKET",
              "rarity": "HOLO",
              "links": {
                "psacard.com": "https://www.psacard.com/cert/48658983"
              }
            }
          }
        }
      ]
    }
  ],
  "pricing": true,
  "slab_grade": true,
  "slab_id": true,
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "80985c61-bc9b-49f2-9756-c09c926b015c",
    "proc_id": "a89e599c-d0cd-4e44-9202-e7a3634adb63"
  },
  "statistics": {
    "processing time": 1.1655206680297852
  }
}

Make the prediction faster and more precise

The endpoint can be faster and more accurate if you send Top Category, Category, Side, Alphabet, Subcategory, Foil/Holo and Rotation in the record. The more information you can send the faster and more precise the system is. You can even specify the set_code of the game, in this way the results are restricted on specific game.

{
    "_url": "https://images.ximilar.com/examples/demo/collectibles/gideon.jpeg",
    "Top Category": "Card",
    "Side": "front",
    "Alphabet": "latin",
    "Category": "Card/Trading Card Game",
    "Subcategory": "Magic The Gathering",
    "Foil/Holo": "Non-Foil",
    "Rotation": "rotation_ok",
    "set_code": "CMM"
}

POST/v2/sport_id

Sport Card Identification

Taxonomy

Given a list of image records, this method returns identification for largest Sport Card detected on image.

This service can identify cards from various sports including Baseball, Basketball, Football, Hockey, Soccer, and MMA. It can also recognize visual features like Foil/Holo and Autograph. The service provides details such as name, team, year, card_number, set_name, and company.

Required attributes

  • Name
    records
    Type
    dict
    Description

    A batch of json records (max 10), one record is representation of an image and it's defined by _url or _base64.

Optional attributes

  • Name
    slab_id
    Type
    boolean
    Default
    Default:False
    Description

    If set to true, then the slab identification will be done via OCR and AI, default False. This will analyse only one slab label on the image and also count additional API credits according to /v2/slab_id.

  • Name
    slab_grade
    Type
    boolean
    Default
    Default:False
    Description

    If set to true, then AI system will analyse the company and grade on the image, default False. This will also count additional API credits according to /v2/slab_grade.

  • Name
    analyze_all
    Type
    boolean
    Default
    Default:False
    Description

    If specified it will analyze all cards on image (only 1 record/image is allowed), the perfect use case is a card binder. The number of credits is per number of analysed cards on image instead of records (cards count * credit price of endpoint).

  • Name
    pricing
    Type
    boolean
    Default
    Default:False
    Description

    If set to true, then system will try to return the prices, default False. This will also count additional API credits according to pricing operation. The API credits will not be counted if the system return no prices.

Returns

HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed. Body of the response is a JSON object (map) with the following fields:

  • Name
    records
    Type
    dict
    Description

    JSON array with the input records, each record enriched by field _objects (of type Slab Label or Card). The main object contains _identification with necessary information of identified card.

  • Name
    status
    Type
    dict
    Description

    A JSON map/dictionary with a status of the method processing. It contains these subfields: code (numeric code of the operation status; it follows the concept of HTTP status codes) and text (text describing the status code).

Request

POST
/v2/sport_id
curl https://api.ximilar.com/collectibles/v2/sport_id -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
  "records": [
      {
        "_url": "__PATH_TO_IMAGE_URL__"
      }
  ],
  "pricing": true
}'

Response

{
  "records": [
    {
      "_url": "https://images.ximilar.com/examples/demo/collectibles/jirip.jpeg",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "cf82301a-46a5-4648-8909-a4894ece97c6"
      },
      "_id": "0aa7edf6-2495-4d0e-8502-f8dd7da8e8c7",
      "_width": 1200,
      "_height": 1600,
      "Category": "Card/Sport Card",
      "_objects": [
        {
          "name": "Card",
          "id": "76fa9ec3-e0d9-408a-b582-55a1cd6712e0",
          "bound_box": [
            77,
            97,
            1096,
            1464
          ],
          "prob": 0.8502776026725769,
          "area": 0.7255067708333334,
          "Top Category": [
            {
              "id": "8ae26c4a-ae79-4c01-9b54-ac4e2b42e914",
              "name": "Card",
              "prob": 1.0
            }
          ],
          "_tags": {
            "Category": [
              {
                "name": "Card/Sport Card",
                "prob": 1.0,
                "id": "a5634621-4a37-4b37-aa3d-720b2d6b35ec",
                "pre-filled": true
              }
            ],
            "Side": [
              {
                "prob": 0.97608,
                "name": "front",
                "id": "651c8141-2b18-479b-a8b1-b959bc34b729"
              }
            ],
            "Subcategory": [
              {
                "prob": 0.84972,
                "name": "MMA",
                "id": "87e0dd9b-68f2-42f2-9283-2379c43f790b"
              }
            ],
            "Autograph": [
              {
                "prob": 0.97988,
                "name": "not signed",
                "id": "5c1bb98b-cd69-42c9-ab2a-75e480ffa2b0"
              }
            ],
            "Foil/Holo": [
              {
                "prob": 0.99476,
                "name": "Foil/Holo",
                "id": "8d0a5c67-eb08-4908-81c9-60e74d7028e7"
              }
            ],
            "Graded": [
              {
                "prob": 0.97944,
                "name": "no",
                "id": "3a532911-7d7c-4b9b-8442-f0f293952be6"
              }
            ]
          },
          "_tags_simple": [
            "Card/Sport Card",
            "front",
            "MMA",
            "not signed",
            "Foil/Holo"
          ],
          "_identification": {
            "best_match": {
              "year": "2021",
              "name": "Jiri Prochazka",
              "set_name": "Chronicles",
              "card_type": "Rookie Card",
              "card_number": "128",
              "subcategory": "MMA",
              "sub_set": "UFC",
              "company": "Panini",
              "full_name": "Jiri Prochazka 2021 #128 Panini Chronicles UFC",
              "links": {
                "ebay.com": "https://www.ebay.com/sch/i.html?_nkw=Jiri+Prochazka+2021+Chronicles+UFC+%23128+RC&_sacat=212",
                "comc.com": "https://www.comc.com/Cards,=Jiri+Prochazka+2021+Chronicles+UFC+%23128+RC",
                "beckett.com": "https://marketplace.beckett.com/search_new/?term=Jiri+Prochazka+2021+Chronicles+UFC+%23128+RC"
              },
              "pricing": {
                "list": [
                  {
                    "item_id": "v1|167302788807|0",
                    "item_link": "https://www.ebay.com/itm/167302788807",
                    "name": "SILVER RC Jiri Prochazka 2021 Panini Chronicles UFC Certified RC #128 MMA 📈",
                    "price": 5.0,
                    "currency": "USD",
                    "country_code": "US",
                    "source": "eBay",
                    "date_of_creation": "2025-02-08",
                    "date_of_sale": null,
                    "grade_company": null,
                    "grade": null,
                    "version": "Foil/Holo",
                    "variation": null
                  }
                ]
              }
            },
            "alternatives": [
              {
                "year": "2021",
                "name": "Jiri Prochazka",
                "set_name": "Chronicles",
                "card_type": "Rookie Card",
                "card_number": "128",
                "sub_set": "UFC",
                "subcategory": "MMA",
                "company": "Panini",
                "full_name": "Jiri Prochazka 2021 #128 Panini Chronicles UFC",
                "links": {
                  "ebay.com": "https://www.ebay.com/sch/i.html?_nkw=Jiri+Prochazka+2021+Chronicles+UFC+%23128+RC&_sacat=212",
                  "comc.com": "https://www.comc.com/Cards,=Jiri+Prochazka+2021+Chronicles+UFC+%23128+RC",
                  "beckett.com": "https://marketplace.beckett.com/search_new/?term=Jiri+Prochazka+2021+Chronicles+UFC+%23128+RC"
                }
              }
            ],
            "distances": [
              0.20778613,
              0.33050093
            ]
          }
        }
      ],
      "Graded Slab": [
        {
          "prob": 0.97944,
          "name": "no",
          "id": "3a532911-7d7c-4b9b-8442-f0f293952be6"
        },
        {
          "prob": 0.02056,
          "name": "yes",
          "id": "9d7bf709-dfbc-4595-91be-a9d779b5f33c"
        }
      ]
    }
  ],
  "pricing": true,
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "cf82301a-46a5-4648-8909-a4894ece97c6",
    "proc_id": "3b7a5c94-2ebb-4586-ad72-859bae9ac8a8"
  },
  "statistics": {
    "processing time": 1.959585428237915
  }
}

POST/v2/comics_id

Comics Identification

Taxonomy

Given a list of images/records, this method returns identification for largest Comics detected on image.

This service can identify comics books, comics magazines and manga. This endpoint will tell you name of the person, title, date of release, issue number, publisher and origin_date. We believe that these few informations are enough to precisely identify the comics.

Required attributes

  • Name
    records
    Type
    dict
    Description

    A batch of json records (max 10), one record is representation of an image and it's defined by _url or _base64.

Optional attributes

  • Name
    slab_id
    Type
    boolean
    Default
    Default:False
    Description

    If set to true, then the slab identification will be done via OCR and AI, default False. This will analyse only one slab label on the image and also count additional API credits according to /v2/slab_id.

  • Name
    slab_grade
    Type
    boolean
    Default
    Default:False
    Description

    If set to true, then AI system will analyse the company and grade on the image, default False. This will also count additional API credits according to /v2/slab_grade.

  • Name
    analyze_all
    Type
    boolean
    Default
    Default:False
    Description

    If specified it will analyze all comics on image (only 1 record/image is allowed), the number of credits is per number of analysed comics on image instead of records (comics count * credit price of endpoint)

  • Name
    pricing
    Type
    boolean
    Default
    Default:False
    Description

    If set to true, then system will try to return the prices, default False. This will also count additional API credits according to pricing operation. The API credits will not be counted if the system return no prices.

Returns

HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed. Body of the response is a JSON object (map) with the following fields:

  • Name
    records
    Type
    dict
    Description

    JSON array with the input records, each record enriched by field _objects (of type Slab Label or Comics). The main object contains _identification with necessary information of identified comics.

  • Name
    status
    Type
    dict
    Description

    A JSON map/dictionary with a status of the method processing. It contains these subfields: code (numeric code of the operation status; it follows the concept of HTTP status codes) and text (text describing the status code).

Request

POST
/v2/comics_id
curl https://api.ximilar.com/collectibles/v2/comics_id -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
  "records": [
      {
        "_url": "__PATH_TO_IMAGE_URL__"
      }
  ],
  "slab_id": true
}'

Response

{
  "records": [
    {
      "_url": "__PATH_TO_IMAGE_URL__",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "d0bbbb58-490f-4721-8273-e32bc01c9bc6"
      },
      "_id": "dec258cf-4d77-4c55-b4b7-418725b4be08",
      "_width": 419,
      "_height": 640,
      "_objects": [
        {
          "name": "Comics",
          "id": "520eee19-2502-41a7-a1cf-23c6daf22138",
          "bound_box": [
            38,
            93,
            370,
            621
          ],
          "prob": 0.7870738506317139,
          "area": 0.6536992840095466,
          "Top Category": [
            {
              "id": "6abbefd9-5571-4915-a057-2fba3c3663a3",
              "name": "Comics",
              "prob": 1.0
            }
          ],
          "_identification": {
            "best_match": {
              "name": "Fantastic Four",
              "title": "Counter-Earth Must Die--At The Hand Of Galactus!",
              "date": "August 1976",
              "number": "173",
              "publisher": "Marvel",
              "origin_date": "1961",
              "links": {
                "ebay.com": "https://www.ebay.com/sch/i.html?_nkw=Comics+Fantastic+Four+%23173+Marvel",
                "midtowncomics.com": "https://www.midtowncomics.com/search?q=Comics+Fantastic+Four+%23173+Marvel"
              }
            },
            "alternatives": []
          }
        },
        {
          "name": "Slab Label",
          "id": "9242aeda-1a35-4c93-b75c-958af91e63a7",
          "bound_box": [
            20,
            14,
            375,
            101
          ],
          "prob": 0.583219051361084,
          "area": 0.115173776849642,
          "Top Category": [
            {
              "id": "79425eda-c25b-48e3-a9de-0fe8303a4635",
              "name": "Slab Label",
              "prob": 1.0
            }
          ],
          "_tags": {
            "Category": [
              {
                "prob": 0.73168,
                "name": "CGC-COMICS",
                "id": "b2aae47e-a788-46c7-98f5-b27d3d1bdd3c"
              }
            ],
            "Side": [
              {
                "prob": 0.94687,
                "name": "front",
                "id": "6b41ebfc-cfbd-4f93-a9bf-bf54b357cafd"
              }
            ],
            "Graded": [
              {
                "prob": 0.95005,
                "name": "yes",
                "id": "9d7bf709-dfbc-4595-91be-a9d779b5f33c"
              }
            ]
          },
          "_tags_simple": [
            "CGC-COMICS",
            "front"
          ],
          "_ocr": {
            "full_text": "CGC UNIVERSAL GRADE 7.5 Fantastic Four173 Marvel Comic.1/76",
            "lang_name": "english",
            "lang": "en"
          },
          "_identification": {
            "best_match": {
              "name": "FANTASTIC FOUR",
              "brand": "MARVEL COMIC",
              "verbal_grade": "Fantastic",
              "grade": "7.5",
              "year": "1976",
              "card_no": "173",
              "certificate_number": null,
              "lang": null
            }
          }
        }
      ],
      "Graded Slab": [
        {
          "prob": 0.95005,
          "name": "yes",
          "id": "9d7bf709-dfbc-4595-91be-a9d779b5f33c"
        },
        {
          "prob": 0.04995,
          "name": "no",
          "id": "3a532911-7d7c-4b9b-8442-f0f293952be6"
        }
      ]
    }
  ],
  "slab_id": true,
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "d0bbbb58-490f-4721-8273-e32bc01c9bc6",
    "proc_id": "cfc7eff0-05a1-47e4-8e30-79bad9253dd5"
  },
  "statistics": {
    "processing time": 0.7930326461791992
  }
}

POST/v2/card_ocr_id

Card OCR & Identification

Taxonomy

Given a list of image records, this method returns and identification for largest card detected (and largest slab label if present) on image. This method is suitable for reading text Cards and Slab Labels (PSA, BECKETT, ...). The identification is done by mining of information from ocr text via AI model (and that is why is sometimes not exactly precise).

Partially correct identification (missing year) for card can look like this:

{
  "name": "ERLING BRAUT HAALAND",
  "year": null,
  "subcategory": "soccer"
}

Correct identification for graded slab label can look like this:

{
  "name": "2019 FINEST UEFA ERLING BRAUT HAALAND",
  "grade": "10",
  "year": "2019",
  "certificate_number": "51974133"
}

Required attributes

  • Name
    records
    Type
    dict
    Description

    A batch of json records (max 10), one record is representation of an image and it's defined by _url or _base64.

Returns

HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed. Body of the response is a JSON object (map) with the following fields:

  • Name
    records
    Type
    dict
    Description

    JSON array with the input records, each record enriched by field _objects (of type Slab Label or Card).

    • _objects (Card, Slab Label) contains _ocr, _tags, _tags_simple and _identification. The _identification contains best_match field. The identification returns info like name, full_name, year, grade, certificate_number...
  • Name
    status
    Type
    dict
    Description

    A JSON map/dictionary with a status of the method processing. It contains these subfields: code (numeric code of the operation status; it follows the concept of HTTP status codes) and text (text describing the status code).

Request

POST
/v2/card_ocr_id
curl https://api.ximilar.com/collectibles/v2/card_ocr_id -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
  "records": [
      {
        "_url": "__PATH_TO_IMAGE_URL__"
      }
  ]
}'

Response

{
  "records": [
    {
      "_url": "__URL_PATH__",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "37d5842e-a6f1-443f-a2c4-6cafa5ed604b"
      },
      "_id": "8c26e90a-627e-444e-a3a6-92845f581858",
      "_objects": [
        {
          "name": "Card",
          "id": "76fa9ec3-e0d9-408a-b582-55a1cd6712e0",
          "bound_box": [
            213,
            403,
            872,
            1273
          ],
          "prob": 0.978815495967865,
          "area": 0.36865354938271605,
          "Top Category": [
            {
              "id": "8ae26c4a-ae79-4c01-9b54-ac4e2b42e914",
              "name": "Card",
              "prob": 1.0
            }
          ],
          "_tags": {
            "Category": [
              {
                "prob": 0.99694,
                "name": "Card/Sport Card",
                "id": "a5634621-4a37-4b37-aa3d-720b2d6b35ec"
              }
            ],
            "Side": [
              {
                "prob": 0.98772,
                "name": "front",
                "id": "651c8141-2b18-479b-a8b1-b959bc34b729"
              }
            ],
            "Subcategory": [
              {
                "prob": 0.96789,
                "name": "soccer",
                "id": "3275f70c-10f4-4807-89ca-f166e8c3aa7c"
              }
            ],
            "Autograph": [
              {
                "prob": 0.97277,
                "name": "not autograph",
                "id": "5c1bb98b-cd69-42c9-ab2a-75e480ffa2b0"
              }
            ]
          },
          "_tags_simple": [
            "Card/Sport Card",
            "front",
            "soccer",
            "not autograph"
          ],
          "_ocr": {
            "texts": [
              {
                "polygon": [
                  [
                    61.0,
                    60.0
                  ],
                  [
                    159.0,
                    55.0
                  ],
                  [
                    160.0,
                    76.0
                  ],
                  [
                    61.0,
                    81.0
                  ]
                ],
                "text": "Tirest",
                "prob": 0.8078048825263977
              },
              {
                "polygon": [
                  [
                    519.0,
                    97.0
                  ],
                  [
                    557.0,
                    97.0
                  ],
                  [
                    557.0,
                    111.0
                  ],
                  [
                    519.0,
                    111.0
                  ]
                ],
                "text": "SEFA",
                "prob": 0.7368016839027405
              },
              {
                "polygon": [
                  [
                    481.0,
                    113.0
                  ],
                  [
                    597.0,
                    111.0
                  ],
                  [
                    597.0,
                    129.0
                  ],
                  [
                    482.0,
                    131.0
                  ]
                ],
                "text": "CHAMPIONS",
                "prob": 0.9519932866096497
              },
              {
                "polygon": [
                  [
                    508.0,
                    127.0
                  ],
                  [
                    573.0,
                    129.0
                  ],
                  [
                    572.0,
                    146.0
                  ],
                  [
                    508.0,
                    144.0
                  ]
                ],
                "text": "LEAGUE,",
                "prob": 0.8668462634086609
              },
              {
                "polygon": [
                  [
                    207.0,
                    300.0
                  ],
                  [
                    372.0,
                    307.0
                  ],
                  [
                    370.0,
                    363.0
                  ],
                  [
                    205.0,
                    356.0
                  ]
                ],
                "text": "Red Bul",
                "prob": 0.9309224486351013
              },
              {
                "polygon": [
                  [
                    61.0,
                    712.0
                  ],
                  [
                    250.0,
                    684.0
                  ],
                  [
                    254.0,
                    719.0
                  ],
                  [
                    66.0,
                    747.0
                  ]
                ],
                "text": "ERLING BRAUT",
                "prob": 0.9668567180633545
              },
              {
                "polygon": [
                  [
                    186.0,
                    753.0
                  ],
                  [
                    370.0,
                    730.0
                  ],
                  [
                    375.0,
                    773.0
                  ],
                  [
                    191.0,
                    795.0
                  ]
                ],
                "text": "HAALAND",
                "prob": 0.9960637092590332
              },
              {
                "polygon": [
                  [
                    330.0,
                    786.0
                  ],
                  [
                    471.0,
                    766.0
                  ],
                  [
                    474.0,
                    788.0
                  ],
                  [
                    333.0,
                    807.0
                  ]
                ],
                "text": "FC SALZBURG",
                "prob": 0.9561893343925476
              }
            ],
            "full_text": "Tirest SEFA CHAMPIONS LEAGUE, Red Bul ERLING BRAUT HAALAND FC SALZBURG ",
            "lang_name": "german",
            "lang": "de"
          },
          "_identification": {
            "best_match": {
              "name": "ERLING BRAUT HAALAND",
              "year": null,
              "subcategory": "soccer"
            }
          }
        },
        {
          "name": "Slab Label",
          "id": "9242aeda-1a35-4c93-b75c-958af91e63a7",
          "bound_box": [
            205,
            108,
            868,
            309
          ],
          "prob": 0.7645022869110107,
          "area": 0.0856886574074074,
          "_tags": {
            "Category": [
              {
                "prob": 0.97388,
                "name": "PSA",
                "id": "2f4545e7-08e4-492b-ab4e-02a409d58988"
              }
            ]
          },
          "_tags_simple": [
            "PSA"
          ],
          "_ocr": {
            "full_text": "#91 2019 FINESTUCL ERLING BRAUT HAALAND GEMMT 10 51974133 ",
            "lang_name": "german",
            "lang": "de"
          },
          "_identification": {
            "best_match": {
              "name": "2019 FINEST UEFA ERLING BRAUT HAALAND",
              "grade": "10",
              "year": "2019",
              "certificate_number": "51974133"
            }
          }
        }
      ]
    }
  ],
  "statistics": {
    "processing time": 6.20737099647522
  },
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "37d5842e-a6f1-443f-a2c4-6cafa5ed604b",
    "proc_id": "189995ef-c1e0-4799-a35e-ad32f4730c81"
  }
}

POST/v2/slab_id

Slab ID

Taxonomy

Given a list of image records, this method returns detected objects (Card, Slab Label) with OCR analysis. The result Slab Label object with _objects (_tags and _ocr included), which represents location of the detected items (and read text). The Slab Label contains information about company/category (BECKETT, CGC, PSA, SGC, ACE, MANA, TAG, OTHER). For one Slab Label per image, this model analyzes read text via AI of the slab and returns the analyzed info in _identification field.

Required attributes

  • Name
    records
    Type
    dict
    Description

    A batch of json records (max 10), one record is representation of an image and it's defined by _url or _base64.

Returns

HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed. Body of the response is a JSON object (map) with the following fields:

  • Name
    records
    Type
    dict
    Description

    JSON array with the input records, each record enriched by fields, Slab Label and _objects with _tags and _ocr.

  • Name
    status
    Type
    dict
    Description

    A JSON map/dictionary with a status of the method processing. It contains these subfields: code (numeric code of the operation status; it follows the concept of HTTP status codes) and text (text describing the status code).

Request

POST
/v2/slab_id
curl https://api.ximilar.com/collectibles/v2/slab_id -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
  "records": [
      {
        "_url": "__PATH_TO_IMAGE_URL__"
      }
  ]
}'

Response

{
  "records": [
    {
      "_url": "https://images.ximilar.com/examples/demo/collectibles/pokemon.jpeg",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "7f10ec20-262e-4a05-93ce-399e0813ef1d"
      },
      "_id": "51750739-c7a3-4ad7-aa0f-28d9fa27d845",
      "_objects": [
        {
          "name": "Slab Label",
          "id": "9242aeda-1a35-4c93-b75c-958af91e63a7",
          "bound_box": [
            88,
            22,
            361,
            131
          ],
          "prob": 0.6562235951423645,
          "area": 0.11607912588599226,
          "Top Category": [
            {
              "id": "79425eda-c25b-48e3-a9de-0fe8303a4635",
              "name": "Slab Label",
              "prob": 1.0
            }
          ],
          "_tags": {
            "Company": [
              {
                "prob": 0.9808,
                "name": "PSA",
                "id": "2f4545e7-08e4-492b-ab4e-02a409d58988"
              }
            ],
            "Side": [
              {
                "prob": 0.94674,
                "name": "front",
                "id": "6b41ebfc-cfbd-4f93-a9bf-bf54b357cafd"
              }
            ],
            "Category": [
              {
                "prob": 0.9808,
                "name": "Slab Label/PSA",
                "id": "2f4545e7-08e4-492b-ab4e-02a409d58988"
              }
            ]
          },
          "_tags_simple": [
            "PSA",
            "front"
          ],
          "_ocr": {
            "texts": [
              {
                "polygon": [
                  [
                    236.0,
                    20.0
                  ],
                  [
                    263.0,
                    20.0
                  ],
                  [
                    263.0,
                    45.0
                  ],
                  [
                    236.0,
                    45.0
                  ]
                ],
                "text": "#8",
                "prob": 0.989625096321106
              },
              {
                "polygon": [
                  [
                    4.0,
                    24.0
                  ],
                  [
                    159.0,
                    24.0
                  ],
                  [
                    159.0,
                    43.0
                  ],
                  [
                    4.0,
                    43.0
                  ]
                ],
                "text": "POKEMON ROCKET",
                "prob": 0.9793843030929565
              },
              {
                "polygon": [
                  [
                    1.0,
                    42.0
                  ],
                  [
                    167.0,
                    42.0
                  ],
                  [
                    167.0,
                    61.0
                  ],
                  [
                    1.0,
                    61.0
                  ]
                ],
                "text": "GYARADOS-HOLO",
                "prob": 0.9837774038314819
              },
              {
                "polygon": [
                  [
                    216.0,
                    41.0
                  ],
                  [
                    263.0,
                    41.0
                  ],
                  [
                    263.0,
                    62.0
                  ],
                  [
                    216.0,
                    62.0
                  ]
                ],
                "text": "MINT",
                "prob": 0.9965052604675293
              },
              {
                "polygon": [
                  [
                    246.0,
                    59.0
                  ],
                  [
                    263.0,
                    59.0
                  ],
                  [
                    263.0,
                    81.0
                  ],
                  [
                    246.0,
                    81.0
                  ]
                ],
                "text": "9",
                "prob": 0.9890574812889099
              },
              {
                "polygon": [
                  [
                    84.0,
                    73.0
                  ],
                  [
                    131.0,
                    73.0
                  ],
                  [
                    131.0,
                    102.0
                  ],
                  [
                    84.0,
                    102.0
                  ]
                ],
                "text": "PA",
                "prob": 0.9283953905105591
              },
              {
                "polygon": [
                  [
                    178.0,
                    76.0
                  ],
                  [
                    264.0,
                    76.0
                  ],
                  [
                    264.0,
                    97.0
                  ],
                  [
                    178.0,
                    97.0
                  ]
                ],
                "text": "48658983",
                "prob": 0.9988992810249329
              }
            ],
            "full_text": "#8 POKEMON ROCKET GYARADOS-HOLO MINT 9 PA 48658983",
            "lang_name": "english",
            "lang": "en"
          },
          "_identification": {
            "best_match": {
              "name": "GYARADOS",
              "brand": "POKEMON",
              "verbal_grade": "MINT",
              "grade": "9",
              "year": null,
              "card_no": "#8",
              "certificate_number": "48658983",
              "lang": null,
              "set": "ROCKET",
              "rarity": "HOLO",
              "links": {
                "psacard.com": "https://www.psacard.com/cert/48658983"
              }
            }
          }
        },
        {
          "name": "Card",
          "id": "76fa9ec3-e0d9-408a-b582-55a1cd6712e0",
          "bound_box": [
            37,
            164,
            353,
            618
          ],
          "prob": 0.9187777042388916,
          "area": 0.559638932557314,
          "Top Category": [
            {
              "id": "8ae26c4a-ae79-4c01-9b54-ac4e2b42e914",
              "name": "Card",
              "prob": 1.0
            }
          ]
        }
      ],
      "_width": 389,
      "_height": 659
    }
  ],
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "7f10ec20-262e-4a05-93ce-399e0813ef1d",
    "proc_id": "125f4de8-94fc-46c2-a67b-7482b253a575"
  },
  "statistics": {
    "processing time": 1.936791181564331
  }
}

POST/v2/slab_grade

Slab Grade

Taxonomy

Given a list of image records, this method returns detected objects (Card, Slab Label) with image recognition analysis. The result Slab Label object with _objects (_tags included), which represents location of the detected items (and analysed features - Company, Grade, Side). The Slab Label object contains information about Company/Category (BECKETT, CGC, PSA, SGC, MANA, ACE, TAG, Other), Grade and Side.

Required attributes

  • Name
    records
    Type
    dict
    Description

    A batch of json records (max 10), one record is representation of an image and it's defined by _url or _base64.

Returns

HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed. Body of the response is a JSON object (map) with the following fields:

  • Name
    records
    Type
    dict
    Description

    JSON array with the input records, each record enriched by fields, Slab Label and _objects with _tags.

  • Name
    status
    Type
    dict
    Description

    A JSON map/dictionary with a status of the method processing. It contains these subfields: code (numeric code of the operation status; it follows the concept of HTTP status codes) and text (text describing the status code).

Request

POST
/v2/slab_grade
curl https://api.ximilar.com/collectibles/v2/slab_grade -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
  "records": [
      {
        "_url": "__PATH_TO_IMAGE_URL__"
      }
  ]
}'

Response

{
  "records": [
    {
      "_url": "https://images.ximilar.com/examples/demo/collectibles/pokemon.jpeg",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "ac414766-83e1-41f2-a589-7958c1fa9f23"
      },
      "_id": "1ee48bb5-e92f-44e7-90cd-72eb898b537e",
      "_objects": [
        {
          "name": "Slab Label",
          "id": "9242aeda-1a35-4c93-b75c-958af91e63a7",
          "bound_box": [
            88,
            22,
            361,
            131
          ],
          "prob": 0.6562235951423645,
          "area": 0.11607912588599226,
          "Top Category": [
            {
              "id": "79425eda-c25b-48e3-a9de-0fe8303a4635",
              "name": "Slab Label",
              "prob": 1.0
            }
          ],
          "_tags": {
            "Company": [
              {
                "prob": 0.9808,
                "name": "PSA",
                "id": "2f4545e7-08e4-492b-ab4e-02a409d58988"
              }
            ],
            "Grade": [
              {
                "prob": 0.5204,
                "name": "9",
                "id": "445d621b-60c1-4e56-b33e-b82d2905ed9c"
              }
            ],
            "Side": [
              {
                "prob": 0.94674,
                "name": "front",
                "id": "6b41ebfc-cfbd-4f93-a9bf-bf54b357cafd"
              }
            ]
          },
          "_tags_simple": [
            "PSA",
            "9",
            "front"
          ]
        },
        {
          "name": "Card",
          "id": "76fa9ec3-e0d9-408a-b582-55a1cd6712e0",
          "bound_box": [
            37,
            164,
            353,
            618
          ],
          "prob": 0.9187777042388916,
          "area": 0.559638932557314,
          "Top Category": [
            {
              "id": "8ae26c4a-ae79-4c01-9b54-ac4e2b42e914",
              "name": "Card",
              "prob": 1.0
            }
          ]
        }
      ],
      "Graded Slab": [
        {
          "prob": 0.9806,
          "name": "yes",
          "id": "9d7bf709-dfbc-4595-91be-a9d779b5f33c"
        },
        {
          "prob": 0.0194,
          "name": "no",
          "id": "3a532911-7d7c-4b9b-8442-f0f293952be6"
        }
      ],
      "_width": 389,
      "_height": 659
    }
  ],
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "ac414766-83e1-41f2-a589-7958c1fa9f23",
    "proc_id": "39e6072b-8430-4821-9047-1fecbf807930"
  },
  "statistics": {
    "processing time": 0.8551025390625
  }
}

POST/v2/detect

Collectibles Detection

Taxonomy

Given a list of image records, this method returns objects of collector's items for each of them. The result images with _objects which represents location of the detected items. This method can be used as a first step for other endpoints as /v2/tcg_id if you know that multiple cards are on the image.

Required attributes

  • Name
    records
    Type
    dict
    Description

    A batch of json records (max 10), one record is representation of an image and it's defined by _url or _base64.

Returns

HTTP error code 2XX, if the method was OK and other HTTP error code, if the method failed. Body of the response is a JSON object (map) with the following fields:

  • Name
    records
    Type
    dict
    Description

    JSON array with the input records, each record enriched by fields (_objects).

  • Name
    status
    Type
    dict
    Description

    A JSON map/dictionary with a status of the method processing. It contains these subfields: code (numeric code of the operation status; it follows the concept of HTTP status codes) and text (text describing the status code).

Request

POST
/v2/detect
curl https://api.ximilar.com/collectibles/v2/detect -H "Content-Type: application/json" -H "Authorization: Token __API_TOKEN__" -d '{
  "records": [
      {
        "_url": "__PATH_TO_IMAGE_URL__"
      }
  ]
}'

Response

{
  "records": [
    {
      "_url": "__IMAGE_URL__",
      "_status": {
        "code": 200,
        "text": "OK",
        "request_id": "1e459b5d-8bed-4d9a-8647-fc1c99997875"
      },
      "_id": "ebb627dd-e859-4677-83cf-612032d2ebb9",
      "_objects": [
        {
          "name": "Card",
          "id": "76fa9ec3-e0d9-408a-b582-55a1cd6712e0",
          "bound_box": [
            105,
            348,
            853,
            1436
          ],
          "prob": 0.9431861639022827,
          "area": 0.5242204881844521,
          "expand_by_bound_box": [
            91,
            327,
            867,
            1457
          ],
          "Top Category": [
            {
              "id": "8ae26c4a-ae79-4c01-9b54-ac4e2b42e914",
              "name": "Card",
              "prob": 1.0
            }
          ]
        },
        {
          "name": "Slab Label",
          "id": "9242aeda-1a35-4c93-b75c-958af91e63a7",
          "bound_box": [
            77,
            32,
            943,
            249
          ],
          "prob": 0.4136030375957489,
          "area": 0.12104897690483277,
          "expand_by_bound_box": [
            60,
            28,
            960,
            253
          ],
          "Top Category": [
            {
              "id": "79425eda-c25b-48e3-a9de-0fe8303a4635",
              "name": "Slab Label",
              "prob": 1.0
            }
          ]
        }
      ],
      "_width": 999,
      "_height": 1554
    }
  ],
  "status": {
    "code": 200,
    "text": "OK",
    "request_id": "1e459b5d-8bed-4d9a-8647-fc1c99997875",
    "proc_id": "219ad5f2-ad11-440c-b337-4f78f304e47b"
  },
  "statistics": {
    "processing time": 2.1185216903686523
  }
}

Was this page helpful?