{
  "openapi": "3.1.0",
  "info": {
    "title": "eBay Sold Listings API",
    "version": "1.0.0",
    "summary": "Real completed eBay sales as JSON or CSV, plus trading card, auction house and resale marketplace data on the same key.",
    "description": "One API key for eBay sold and active listings on 8 eBay marketplaces (up to 240 per request, local currency), item details, accepted Best Offer prices, batch jobs and CSV, sold prices from a photo, PSA prices and population, TCGplayer, Beckett cert lookup, Goldin, Fanatics Collect, Pristine Auction, MySlabs, Whatnot, Mercari, Poshmark, Depop and Grailed. Every source counts one request per successful call (photo search two); failed calls are never charged. The Unlimited plan removes the monthly request count.",
    "termsOfService": "https://ebaysoldlistingsapi.com/terms",
    "contact": {
      "name": "eBay Sold Listings API support",
      "email": "support@ebaysoldlistingsapi.com",
      "url": "https://ebaysoldlistingsapi.com/contact"
    }
  },
  "externalDocs": {
    "description": "Documentation",
    "url": "https://ebaysoldlistingsapi.com/docs"
  },
  "servers": [
    {
      "url": "https://api.ebaysoldlistingsapi.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "eBay",
      "description": "eBay sold and active listings, photo search, item details and Best Offer prices."
    },
    {
      "name": "Batch",
      "description": "Many keywords or listings in one job."
    },
    {
      "name": "PSA",
      "description": "PSA prices by grade, population and sets."
    },
    {
      "name": "Trading cards",
      "description": "TCGplayer, Beckett and graded card auction houses."
    },
    {
      "name": "Resale marketplaces",
      "description": "Whatnot, Mercari, Poshmark, Depop and Grailed."
    },
    {
      "name": "Account",
      "description": "Usage, history and status."
    }
  ],
  "paths": {
    "/scrape": {
      "get": {
        "operationId": "searchSoldListings",
        "tags": [
          "eBay"
        ],
        "summary": "eBay sold listings (or active listings) for a keyword",
        "description": "Up to 240 completed eBay sales for a keyword on one of 8 eBay marketplaces, each with sold price, date, condition, shipping, seller and link, in the marketplace's own currency. sold=false returns current listings in the same shape. format=csv returns CSV.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Search term, exactly as you would type it on eBay, up to 300 characters.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "ebaySite",
            "in": "query",
            "required": false,
            "description": "Marketplace. Prices come back in its local currency.",
            "schema": {
              "type": "string",
              "enum": [
                "ebay.com",
                "ebay.co.uk",
                "ebay.de",
                "ebay.com.au",
                "ebay.ca",
                "ebay.fr",
                "ebay.it",
                "ebay.es"
              ],
              "default": "ebay.com"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Rows to return, up to 240.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 240,
              "default": 240
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 1
            }
          },
          {
            "name": "sold",
            "in": "query",
            "required": false,
            "description": "true = completed sales, false = current active listings.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "bestOfferPrice",
            "in": "query",
            "required": false,
            "description": "Add acceptedOfferPrice to accepted Best Offer sales. No extra cost.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort order.",
            "schema": {
              "type": "string",
              "enum": [
                "endedRecently",
                "timeNewlyListed",
                "pricePlusPostageLowest",
                "pricePlusPostageHighest",
                "distanceNearest"
              ]
            }
          },
          {
            "name": "itemCondition",
            "in": "query",
            "required": false,
            "description": "Condition filter.",
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "new",
                "used"
              ]
            }
          },
          {
            "name": "conditionId",
            "in": "query",
            "required": false,
            "description": "A precise eBay condition ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buyingFormat",
            "in": "query",
            "required": false,
            "description": "Buying format.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "auction",
                "buyItNow",
                "acceptsOffers"
              ]
            }
          },
          {
            "name": "minPrice",
            "in": "query",
            "required": false,
            "description": "Lowest price, marketplace currency.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "required": false,
            "description": "Highest price, marketplace currency.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "soldAfter",
            "in": "query",
            "required": false,
            "description": "Only sales on or after this date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "soldBefore",
            "in": "query",
            "required": false,
            "description": "Only sales on or before this date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "itemLocation",
            "in": "query",
            "required": false,
            "description": "Item location.",
            "schema": {
              "type": "string",
              "enum": [
                "default",
                "domestic",
                "worldwide"
              ]
            }
          },
          {
            "name": "sellerCountry",
            "in": "query",
            "required": false,
            "description": "Only sellers in this country.",
            "schema": {
              "type": "string",
              "enum": [
                "US",
                "GB",
                "AU",
                "CN",
                "FR",
                "DE",
                "HK",
                "IT",
                "JP",
                "KR",
                "NL"
              ]
            }
          },
          {
            "name": "postalCode",
            "in": "query",
            "required": false,
            "description": "Quote calculated shipping to this postal code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryId",
            "in": "query",
            "required": false,
            "description": "eBay category ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "relevance",
            "in": "query",
            "required": false,
            "description": "true removes results that do not match the search; false returns eBay's results as listed.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "exactMatch",
            "in": "query",
            "required": false,
            "description": "Drop eBay's 'results matching fewer words' section.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "fresh",
            "in": "query",
            "required": false,
            "description": "Always search live instead of a recent copy.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json or csv (one row per listing).",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "csv"
              ],
              "default": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sold or active listings.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScrapeResponse"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/scrape/image": {
      "post": {
        "operationId": "searchSoldListingsByPhoto",
        "tags": [
          "eBay"
        ],
        "summary": "eBay sold prices from a photo",
        "description": "Reads a photo, identifies the item (brand, model, variant; for trading cards the set, number, grader and grade), turns it into an eBay keyword and runs the normal sold search with it. The response shows the keyword used (identified), then the same fields as GET /scrape. Every /scrape option works in the query string. Send the photo as multipart field image (with a Content-Length header), as an image/* body, as JSON {\"imageUrl\"} or as ?imageUrl= (a public https address, up to 2,000 characters). Images up to 8 MB. Up to 20 photos per minute per account. A failed search after identification answers the normal search error and is not charged.\n\nCost: 2 requests on success (1 to read the photo, 1 for the search). Nothing when the photo is not identified or the search fails.",
        "parameters": [
          {
            "name": "imageUrl",
            "in": "query",
            "required": false,
            "description": "A public https image link, instead of uploading the photo.",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "ebaySite",
            "in": "query",
            "required": false,
            "description": "Marketplace. Prices come back in its local currency.",
            "schema": {
              "type": "string",
              "enum": [
                "ebay.com",
                "ebay.co.uk",
                "ebay.de",
                "ebay.com.au",
                "ebay.ca",
                "ebay.fr",
                "ebay.it",
                "ebay.es"
              ],
              "default": "ebay.com"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Rows to return, up to 240.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 240,
              "default": 240
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 1
            }
          },
          {
            "name": "sold",
            "in": "query",
            "required": false,
            "description": "true = completed sales, false = current active listings.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "bestOfferPrice",
            "in": "query",
            "required": false,
            "description": "Add acceptedOfferPrice to accepted Best Offer sales. No extra cost.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort order.",
            "schema": {
              "type": "string",
              "enum": [
                "endedRecently",
                "timeNewlyListed",
                "pricePlusPostageLowest",
                "pricePlusPostageHighest",
                "distanceNearest"
              ]
            }
          },
          {
            "name": "itemCondition",
            "in": "query",
            "required": false,
            "description": "Condition filter.",
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "new",
                "used"
              ]
            }
          },
          {
            "name": "conditionId",
            "in": "query",
            "required": false,
            "description": "A precise eBay condition ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buyingFormat",
            "in": "query",
            "required": false,
            "description": "Buying format.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "auction",
                "buyItNow",
                "acceptsOffers"
              ]
            }
          },
          {
            "name": "minPrice",
            "in": "query",
            "required": false,
            "description": "Lowest price, marketplace currency.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "required": false,
            "description": "Highest price, marketplace currency.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "soldAfter",
            "in": "query",
            "required": false,
            "description": "Only sales on or after this date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "soldBefore",
            "in": "query",
            "required": false,
            "description": "Only sales on or before this date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "itemLocation",
            "in": "query",
            "required": false,
            "description": "Item location.",
            "schema": {
              "type": "string",
              "enum": [
                "default",
                "domestic",
                "worldwide"
              ]
            }
          },
          {
            "name": "sellerCountry",
            "in": "query",
            "required": false,
            "description": "Only sellers in this country.",
            "schema": {
              "type": "string",
              "enum": [
                "US",
                "GB",
                "AU",
                "CN",
                "FR",
                "DE",
                "HK",
                "IT",
                "JP",
                "KR",
                "NL"
              ]
            }
          },
          {
            "name": "postalCode",
            "in": "query",
            "required": false,
            "description": "Quote calculated shipping to this postal code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categoryId",
            "in": "query",
            "required": false,
            "description": "eBay category ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "relevance",
            "in": "query",
            "required": false,
            "description": "true removes results that do not match the search; false returns eBay's results as listed.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "exactMatch",
            "in": "query",
            "required": false,
            "description": "Drop eBay's 'results matching fewer words' section.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "fresh",
            "in": "query",
            "required": false,
            "description": "Always search live instead of a recent copy.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string",
                    "format": "binary",
                    "description": "The photo."
                  }
                }
              }
            },
            "image/*": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "imageUrl": {
                    "type": "string",
                    "description": "Public https image link.",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Identified keyword plus sold listings.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoSearchResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "411": {
            "description": "A multipart upload without a Content-Length header. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "invalid_params"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Image larger than 8 MB. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "invalid_image"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "415": {
            "description": "Not a supported image type. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "invalid_image"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "The photo does not show one identifiable item, or the link is not a reachable image. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "image_not_identified",
                            "image_unavailable",
                            "invalid_image"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/scrape/batch": {
      "post": {
        "operationId": "createSearchBatch",
        "tags": [
          "Batch"
        ],
        "summary": "Run up to 100 keywords in one job",
        "description": "Submit 1 to 100 keywords; any /scrape parameter in the body applies to every keyword. Answers 202 with a job ID to poll. One batch job per account at a time.\n\nCost: 1 request per keyword that succeeds. Failed keywords are free. Refused with 402 when the remaining allowance is smaller than the number of keywords.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Plus any other /scrape parameter.",
                "properties": {
                  "keywords": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    },
                    "description": "1 to 100 keywords."
                  },
                  "ebaySite": {
                    "type": "string",
                    "enum": [
                      "ebay.com",
                      "ebay.co.uk",
                      "ebay.de",
                      "ebay.com.au",
                      "ebay.ca",
                      "ebay.fr",
                      "ebay.it",
                      "ebay.es"
                    ]
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 240
                  }
                },
                "required": [
                  "keywords"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Job accepted. Poll resultsUrl.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchAccepted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/scrape/batch/{jobId}": {
      "get": {
        "operationId": "getSearchBatch",
        "tags": [
          "Batch"
        ],
        "summary": "Poll a search batch job",
        "description": "Status (queued, running, complete), counts and the results so far, one entry per keyword.\n\nCost: Free.",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Job ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Job status and results.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchBatch"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/scrape/batch/{jobId}/download.csv": {
      "get": {
        "operationId": "downloadSearchBatchCsv",
        "tags": [
          "Batch"
        ],
        "summary": "Download a finished search batch as one CSV",
        "description": "One row per listing, with a leading keyword column.\n\nCost: Free.",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Job ID."
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/best-offer-prices": {
      "get": {
        "operationId": "getBestOfferPrices",
        "tags": [
          "eBay"
        ],
        "summary": "Accepted Best Offer prices found so far",
        "description": "For up to 100 item IDs from earlier bestOfferPrice=true searches: the accepted price and its status (found, pending, not_available, unknown).\n\nCost: Free: does not count against the monthly requests.",
        "parameters": [
          {
            "name": "itemIds",
            "in": "query",
            "required": true,
            "description": "Up to 100 eBay item IDs, comma separated.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Accepted prices.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "itemId": {
                            "type": "string",
                            "description": "Item ID."
                          },
                          "acceptedOfferPrice": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Price the buyer paid."
                          },
                          "acceptedOfferPriceStatus": {
                            "type": "string",
                            "description": "Status.",
                            "enum": [
                              "found",
                              "pending",
                              "not_available",
                              "unknown"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/items/details": {
      "get": {
        "operationId": "getItemDetails",
        "tags": [
          "eBay"
        ],
        "summary": "Full details of one eBay listing, sold listings included",
        "description": "Condition, seller notes, every item specific, the full description, photos, buying format, bid count and quantity sold of a listing, for as long as eBay keeps the listing page. A won auction is reported as sold at the winning bid.\n\nCost: 1 request. Free when eBay no longer has the listing.",
        "parameters": [
          {
            "name": "itemId",
            "in": "query",
            "required": true,
            "description": "eBay item ID, for example from a sold search.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fresh",
            "in": "query",
            "required": false,
            "description": "Read the page live instead of a recent copy.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Listing details.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemDetails"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "description": "eBay no longer has the listing. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "item_unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "The listing page could not be read. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "item_unreadable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/items/details/batch": {
      "post": {
        "operationId": "createItemDetailsBatch",
        "tags": [
          "Batch"
        ],
        "summary": "Item details for up to 50 listings in one job",
        "description": "Submit up to 50 item IDs and poll for the results. Counts one item details lookup per listing against the per-minute limit when submitted. One batch job per account at a time.\n\nCost: 1 request per listing returned. Unavailable and failed listings are free.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "itemIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "1 to 50 eBay item IDs."
                  }
                },
                "required": [
                  "itemIds"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Job accepted. Poll resultsUrl.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchAccepted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/items/details/batch/{jobId}": {
      "get": {
        "operationId": "getItemDetailsBatch",
        "tags": [
          "Batch"
        ],
        "summary": "Poll an item details batch job",
        "description": "Status, counts and one result per listing read so far, in the order sent: {itemId, status: ok, details} or {itemId, status: failed, code, error}.\n\nCost: Free.",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Job ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Job status and results.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "description": "Job ID."
                    },
                    "status": {
                      "type": "string",
                      "description": "Job status.",
                      "enum": [
                        "queued",
                        "running",
                        "complete"
                      ]
                    },
                    "completed": {
                      "type": "integer",
                      "description": "Listings finished."
                    },
                    "succeeded": {
                      "type": "integer",
                      "description": "Listings read."
                    },
                    "failed": {
                      "type": "integer",
                      "description": "Listings that failed (free)."
                    },
                    "total": {
                      "type": "integer",
                      "description": "Listings in the job."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "itemId": {
                            "type": "string",
                            "description": "Item ID."
                          },
                          "status": {
                            "type": "string",
                            "description": "ok or failed."
                          },
                          "details": {
                            "$ref": "#/components/schemas/ItemDetails"
                          },
                          "code": {
                            "type": "string",
                            "description": "Error code when failed."
                          },
                          "error": {
                            "type": "string",
                            "description": "Message when failed."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/goldin/sold": {
      "get": {
        "operationId": "searchGoldinSold",
        "tags": [
          "Trading cards"
        ],
        "summary": "Goldin sold results",
        "description": "Goldin sold results by keyword, 50 per page, with the price the buyer paid (buyer's premium included where charged), sale date, sale type, grading company and grade.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Card, player, set and grade, up to 300 characters.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort.",
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "price_desc",
                "price_asc"
              ],
              "default": "recent"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page, 1 to 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Goldin sales.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "The keyword searched."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page returned."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "Source of the rows."
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "How many rows match, when the source reports it."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows in this response."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "True while more rows are available."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuctionSale"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scrapedAt": {
                      "type": "string",
                      "description": "When the rows were read (ISO 8601)."
                    },
                    "pageSize": {
                      "type": "integer",
                      "description": "Rows per page."
                    },
                    "sortBy": {
                      "type": "string",
                      "description": "Sort used."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/fanatics/sold": {
      "get": {
        "operationId": "searchFanaticsSold",
        "tags": [
          "Trading cards"
        ],
        "summary": "Fanatics Collect (formerly PWCC) sold results",
        "description": "Fanatics Collect (formerly PWCC) sold results by keyword, 50 per page, with the price the buyer paid (buyer's premium included where charged), sale date, sale type, grading company and grade.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Card, player, set and grade, up to 300 characters.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort.",
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "price_desc",
                "price_asc"
              ],
              "default": "recent"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page, 1 to 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fanatics Collect (formerly PWCC) sales.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "The keyword searched."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page returned."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "Source of the rows."
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "How many rows match, when the source reports it."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows in this response."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "True while more rows are available."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuctionSale"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scrapedAt": {
                      "type": "string",
                      "description": "When the rows were read (ISO 8601)."
                    },
                    "pageSize": {
                      "type": "integer",
                      "description": "Rows per page."
                    },
                    "sortBy": {
                      "type": "string",
                      "description": "Sort used."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/pristine/sold": {
      "get": {
        "operationId": "searchPristineSold",
        "tags": [
          "Trading cards"
        ],
        "summary": "Pristine Auction sold results",
        "description": "Pristine Auction sold results by keyword, 60 per page, with the price the buyer paid (buyer's premium included where charged), sale date, sale type, grading company and grade.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Card, player, set and grade, up to 300 characters.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort.",
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "price_desc",
                "price_asc"
              ],
              "default": "recent"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page, 1 to 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pristine Auction sales.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "The keyword searched."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page returned."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "Source of the rows."
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "How many rows match, when the source reports it."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows in this response."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "True while more rows are available."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuctionSale"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scrapedAt": {
                      "type": "string",
                      "description": "When the rows were read (ISO 8601)."
                    },
                    "pageSize": {
                      "type": "integer",
                      "description": "Rows per page."
                    },
                    "sortBy": {
                      "type": "string",
                      "description": "Sort used."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/myslabs/sold": {
      "get": {
        "operationId": "searchMyslabsSold",
        "tags": [
          "Trading cards"
        ],
        "summary": "MySlabs sold results",
        "description": "MySlabs sold results by keyword, up to 72 per page, with the price the buyer paid (buyer's premium included where charged), sale date, sale type, grading company and grade.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Card, player, set and grade, up to 300 characters.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort.",
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "price_desc",
                "price_asc"
              ],
              "default": "recent"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page, 1 only.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "deep",
            "in": "query",
            "required": false,
            "description": "Merge every sort order and price range for a few hundred sales (about 3 per minute per account).",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "MySlabs sales.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "The keyword searched."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page returned."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "Source of the rows."
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "How many rows match, when the source reports it."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows in this response."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "True while more rows are available."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuctionSale"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scrapedAt": {
                      "type": "string",
                      "description": "When the rows were read (ISO 8601)."
                    },
                    "pageSize": {
                      "type": "integer",
                      "description": "Rows per page."
                    },
                    "sortBy": {
                      "type": "string",
                      "description": "Sort used."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/psa/search": {
      "get": {
        "operationId": "searchPsaCards",
        "tags": [
          "PSA"
        ],
        "summary": "Find a PSA card and its specId",
        "description": "Search PSA cards by name, set and number. Each match has the specId used by /psa/card.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Card name, set, number.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Matches.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 10
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching cards.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "Keyword."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "psa"
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Matches."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "specId": {
                            "type": "string",
                            "description": "PSA spec ID."
                          },
                          "description": {
                            "type": "string",
                            "description": "Card description."
                          },
                          "subject": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Subject."
                          },
                          "cardNumber": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Number."
                          },
                          "setName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Set."
                          },
                          "year": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Year."
                          },
                          "category": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Category."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/psa/card": {
      "get": {
        "operationId": "getPsaCard",
        "tags": [
          "PSA"
        ],
        "summary": "PSA prices by grade, recent sales and population for one card",
        "description": "Send a specId (or a keyword; the best match is used and other matches are listed in otherMatches).\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "specId",
            "in": "query",
            "required": false,
            "description": "PSA spec ID. Required unless keyword is sent.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "required": false,
            "description": "Card name, set, number.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Recent sales in items.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "name": "timeRange",
            "in": "query",
            "required": false,
            "description": "Months of sales to include (0 = all available).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 120,
              "default": 0
            }
          },
          {
            "name": "grade",
            "in": "query",
            "required": false,
            "description": "A PSA grade 1 to 10 (half grades allowed) or raw.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marketplace",
            "in": "query",
            "required": false,
            "description": "Keep only that marketplace's sales.",
            "schema": {
              "type": "string",
              "enum": [
                "ebay",
                "fanatics",
                "goldin",
                "heritage"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Card, prices by grade, population and sales.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "card": {
                      "type": "object",
                      "properties": {
                        "specId": {
                          "type": "string",
                          "description": "Spec ID."
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject."
                        },
                        "cardNumber": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Number."
                        },
                        "setName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Set."
                        },
                        "year": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Year."
                        }
                      }
                    },
                    "priceByGrade": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "grade": {
                            "type": "string",
                            "description": "Grade."
                          },
                          "sales": {
                            "type": "integer",
                            "description": "Sales."
                          },
                          "averagePrice": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Average."
                          },
                          "minPrice": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Lowest."
                          },
                          "maxPrice": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Highest."
                          },
                          "latestPrice": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Latest."
                          }
                        }
                      }
                    },
                    "population": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "Total graded."
                        },
                        "gemRate": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Share graded 10."
                        },
                        "grades": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "grade": {
                                "type": "string",
                                "description": "Grade."
                              },
                              "count": {
                                "type": "integer",
                                "description": "Copies."
                              },
                              "withQualifier": {
                                "type": "integer",
                                "description": "Copies with a qualifier."
                              }
                            }
                          }
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "saleDate": {
                            "type": "string",
                            "description": "Sale time."
                          },
                          "salePrice": {
                            "type": "number",
                            "description": "Price."
                          },
                          "saleType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Sale type."
                          },
                          "gradingCompany": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Grading company."
                          },
                          "grade": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Grade."
                          },
                          "certNumber": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Cert number."
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Listing link."
                          }
                        }
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/psa/sets": {
      "get": {
        "operationId": "listPsaSets",
        "tags": [
          "PSA"
        ],
        "summary": "Every PSA set for a game, or set search",
        "description": "Games: pokemon, one-piece, magic, yugioh, dragon-ball, lorcana, digimon, weiss-schwarz, union-arena, flesh-and-blood, star-wars-unlimited, cardfight-vanguard, duel-masters, battle-spirits, final-fantasy, gundam, shadowverse, riftbound, grand-archive, wixoss.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "game",
            "in": "query",
            "required": false,
            "description": "Game slug.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "required": false,
            "description": "Words in the set name. Required unless game is sent.",
            "schema": {
              "type": "string",
              "minLength": 2
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Year.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}$"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Sets per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sets.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Keyword."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "psa"
                    },
                    "game": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Game."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "More pages."
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Matching sets."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "headingId": {
                            "type": "string",
                            "description": "Set ID for /psa/set."
                          },
                          "name": {
                            "type": "string",
                            "description": "Set name."
                          },
                          "year": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Year."
                          },
                          "url": {
                            "type": "string",
                            "description": "PSA population page."
                          },
                          "gradedTotal": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Cards graded."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/psa/set": {
      "get": {
        "operationId": "getPsaSet",
        "tags": [
          "PSA"
        ],
        "summary": "Population of every card in a PSA set",
        "description": "Every card in the set with its population for every grade, plus set totals. Up to 6 calls per minute per account.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "headingId",
            "in": "query",
            "required": false,
            "description": "Set ID from /psa/sets. Required unless url is sent.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "description": "The set's PSA population page.",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Set population.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "set": {
                      "type": "object",
                      "properties": {
                        "headingId": {
                          "type": "string",
                          "description": "Set ID."
                        },
                        "name": {
                          "type": "string",
                          "description": "Name."
                        },
                        "year": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Year."
                        },
                        "gradedTotal": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Cards graded."
                        }
                      }
                    },
                    "totalCards": {
                      "type": "integer",
                      "description": "Cards in the set."
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "Total."
                        },
                        "grades": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "grade": {
                                "type": "string",
                                "description": "Grade."
                              },
                              "count": {
                                "type": "integer",
                                "description": "Copies."
                              },
                              "withQualifier": {
                                "type": "integer",
                                "description": "With qualifier."
                              }
                            }
                          }
                        }
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "specId": {
                            "type": "string",
                            "description": "Spec ID."
                          },
                          "cardNumber": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Number."
                          },
                          "name": {
                            "type": "string",
                            "description": "Card name."
                          },
                          "variety": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Variety."
                          },
                          "population": {
                            "type": "object",
                            "properties": {
                              "total": {
                                "type": "integer",
                                "description": "Total."
                              },
                              "grades": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "grade": {
                                      "type": "string",
                                      "description": "Grade."
                                    },
                                    "count": {
                                      "type": "integer",
                                      "description": "Copies."
                                    },
                                    "withQualifier": {
                                      "type": "integer",
                                      "description": "With qualifier."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/tcgplayer/sold": {
      "get": {
        "operationId": "getTcgplayerSales",
        "tags": [
          "Trading cards"
        ],
        "summary": "TCGplayer completed sales",
        "description": "Up to 250 recent TCGplayer sales for a product (by keyword or productId) with condition, variant, language, quantity, price and sold time, plus optional market price history.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": false,
            "description": "Card or product name. Required unless productId is sent.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "productId",
            "in": "query",
            "required": false,
            "description": "TCGplayer product ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Sales.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 100
            }
          },
          {
            "name": "condition",
            "in": "query",
            "required": false,
            "description": "For example Near Mint.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant",
            "in": "query",
            "required": false,
            "description": "For example Holofoil.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "For example English.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "history",
            "in": "query",
            "required": false,
            "description": "Market price history buckets.",
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "month",
                "quarter",
                "annual"
              ],
              "default": "none"
            }
          },
          {
            "name": "soldAfter",
            "in": "query",
            "required": false,
            "description": "Only sales on or after this date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "soldBefore",
            "in": "query",
            "required": false,
            "description": "Only sales on or before this date.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "fresh",
            "in": "query",
            "required": false,
            "description": "Read live instead of a recent copy.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Product, sales and summary.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object"
                    },
                    "otherMatches": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Title."
                          },
                          "condition": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Condition."
                          },
                          "variant": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Variant."
                          },
                          "language": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Language."
                          },
                          "quantity": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Quantity."
                          },
                          "price": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Price."
                          },
                          "shipping": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Shipping."
                          },
                          "totalPrice": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Price plus shipping."
                          },
                          "soldAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Sold time."
                          },
                          "listingType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Listing type."
                          },
                          "imageUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Product picture."
                          }
                        }
                      }
                    },
                    "priceHistory": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/tcgplayer/listings": {
      "get": {
        "operationId": "getTcgplayerListings",
        "tags": [
          "Trading cards"
        ],
        "summary": "TCGplayer current listings",
        "description": "Current listings for a product with price, shipping, condition, variant, language, quantity and seller details.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": false,
            "description": "Card or product name. Required unless productId is sent.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "productId",
            "in": "query",
            "required": false,
            "description": "TCGplayer product ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Listings per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 25
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 1
            }
          },
          {
            "name": "condition",
            "in": "query",
            "required": false,
            "description": "Condition.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant",
            "in": "query",
            "required": false,
            "description": "Variant.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Language.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Listings.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object"
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "More pages."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/whatnot/listings": {
      "get": {
        "operationId": "searchWhatnotListings",
        "tags": [
          "Resale marketplaces"
        ],
        "summary": "Whatnot Buy It Now listings and live-show auctions",
        "description": "What is for sale on Whatnot now: Buy It Now listings and live-show auctions with starting price, current bid, bid count and show start time, card details (grading service, grade, cert number, set, card number), every photo and the seller's rating. Filter by format, shipped-from country, category, price, seller rating and card attributes, or search one seller's shop. facets lists the filter values for the search. Up to 1,000 listings per search, up to 60 Whatnot calls a minute per account. Whatnot does not publish keyword-wide sold prices, so these are asking prices and live bids.\n\nCost: 1 request. An unknown seller (404) is free.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": false,
            "description": "Card, player, set or item. Required unless seller is set.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Listing format.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "buy_it_now",
                "auction"
              ],
              "default": "all"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort.",
            "schema": {
              "type": "string",
              "enum": [
                "best_match",
                "newest",
                "price_asc",
                "price_desc"
              ],
              "default": "best_match"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Listings per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 48,
              "default": 24
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor from the previous page, instead of page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "seller",
            "in": "query",
            "required": false,
            "description": "A Whatnot username: search only that seller's shop.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Shipped-from countries, comma separated: us, gb (or uk), ca, au, de, fr, jp and others.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Whatnot category IDs, comma separated, for example pokemon_cards, sports_cards.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minPrice",
            "in": "query",
            "required": false,
            "description": "Lowest price in the listing's currency.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "required": false,
            "description": "Highest price in the listing's currency.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "minSellerRating",
            "in": "query",
            "required": false,
            "description": "Minimum seller rating.",
            "schema": {
              "type": "number",
              "enum": [
                4,
                4.5,
                5
              ]
            }
          },
          {
            "name": "premierShop",
            "in": "query",
            "required": false,
            "description": "Premier Shop sellers only.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "graded",
            "in": "query",
            "required": false,
            "description": "Graded items only.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "autographed",
            "in": "query",
            "required": false,
            "description": "Autographed items only.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "condition",
            "in": "query",
            "required": false,
            "description": "Comma separated, for example Graded, Near Mint.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gradingService",
            "in": "query",
            "required": false,
            "description": "Comma separated, for example PSA, BGS, CGC, SGC.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "grade",
            "in": "query",
            "required": false,
            "description": "Grades as sellers write them, comma separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "set",
            "in": "query",
            "required": false,
            "description": "Card sets, comma separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Comma separated, for example English, Japanese.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rarity",
            "in": "query",
            "required": false,
            "description": "Comma separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cardNumber",
            "in": "query",
            "required": false,
            "description": "Card numbers as listed, comma separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "certNumber",
            "in": "query",
            "required": false,
            "description": "Grading cert numbers, comma separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productType",
            "in": "query",
            "required": false,
            "description": "Comma separated, for example Card, Booster Box.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fresh",
            "in": "query",
            "required": false,
            "description": "Search live instead of a copy from the last 15 minutes.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Whatnot listings.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatnotListingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "description": "No Whatnot seller with that username. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "not_found"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/beckett/cert": {
      "get": {
        "operationId": "lookupBeckettCert",
        "tags": [
          "Trading cards"
        ],
        "summary": "Beckett cert lookup (BGS, BVG, BCCG)",
        "description": "The graded card behind a Beckett cert number: final grade, centering, corners, edges and surface subgrades, autograph grade, label color, set, sport or game, card number, player or card name, date graded, population report and the front photo when Beckett has one. New certs: up to 4 lookups a minute per account (503 server_busy with Retry-After above that); repeated certs are kept 7 days and answer at once.\n\nCost: 1 request. An unknown cert (404) is free.",
        "parameters": [
          {
            "name": "cert",
            "in": "query",
            "required": true,
            "description": "The cert number on the Beckett label, up to 10 digits; leading zeros optional.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,10}$"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Grading line.",
            "schema": {
              "type": "string",
              "enum": [
                "BGS",
                "BVG",
                "BCCG"
              ],
              "default": "BGS"
            }
          },
          {
            "name": "fresh",
            "in": "query",
            "required": false,
            "description": "Read the cert again instead of the stored answer (kept 7 days).",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The graded card.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BeckettCert"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "description": "Beckett has no graded card with this cert number. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "not_found"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/mercari": {
      "get": {
        "operationId": "searchMercari",
        "tags": [
          "Resale marketplaces"
        ],
        "summary": "Mercari sold listings (or active listings)",
        "description": "Mercari US sold listings by keyword, or current listings with sold=false, up to 100 per page, with price, original price, condition, brand, category, seller ID and images. Sold searches include a price summary.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Search term.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "sold",
            "in": "query",
            "required": false,
            "description": "true = sold listings, false = active listings.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Rows per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 1
            }
          },
          {
            "name": "sortOrder",
            "in": "query",
            "required": false,
            "description": "Sort.",
            "schema": {
              "type": "string",
              "enum": [
                "bestMatch",
                "newest",
                "lowestPrice",
                "highestPrice",
                "recentlySold",
                "mostPopular"
              ],
              "default": "bestMatch"
            }
          },
          {
            "name": "minPrice",
            "in": "query",
            "required": false,
            "description": "Lowest price, USD.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "required": false,
            "description": "Highest price, USD.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "itemCondition",
            "in": "query",
            "required": false,
            "description": "Condition.",
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "new",
                "likeNew",
                "good",
                "fair",
                "poor"
              ],
              "default": "any"
            }
          },
          {
            "name": "categoryId",
            "in": "query",
            "required": false,
            "description": "Mercari category ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brandId",
            "in": "query",
            "required": false,
            "description": "Mercari brand ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeListedAt",
            "in": "query",
            "required": false,
            "description": "Add listedAt, the posting time Mercari shows (a few seconds slower).",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Mercari listings.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "The keyword searched."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page returned."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "Source of the rows."
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "How many rows match, when the source reports it."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows in this response."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "True while more rows are available."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MercariItem"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scrapedAt": {
                      "type": "string",
                      "description": "When the rows were read (ISO 8601)."
                    },
                    "count": {
                      "type": "integer",
                      "description": "Rows requested."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/poshmark/sold": {
      "get": {
        "operationId": "searchPoshmarkSold",
        "tags": [
          "Resale marketplaces"
        ],
        "summary": "Poshmark sold listings",
        "description": "Poshmark US sold listings by keyword, up to 48 per page, with sold and original price, brand, size, category, condition, New With Tags flag, colors, sold and listed time, days to sell, likes, comments, shares and seller. enrich=true adds seller location, approximate sold count and average ship time when Poshmark shows them.\n\nCost: 1 request (enrich=true included).",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Search term.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 1
            }
          },
          {
            "name": "minPrice",
            "in": "query",
            "required": false,
            "description": "Lowest price, USD.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "required": false,
            "description": "Highest price, USD.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "description": "Department.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "women",
                "men",
                "kids",
                "home",
                "pets",
                "electronics"
              ],
              "default": "all"
            }
          },
          {
            "name": "condition",
            "in": "query",
            "required": false,
            "description": "all or nwt (New With Tags).",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "nwt"
              ],
              "default": "all"
            }
          },
          {
            "name": "brand",
            "in": "query",
            "required": false,
            "description": "Poshmark brand name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort.",
            "schema": {
              "type": "string",
              "enum": [
                "sold_recently",
                "price_asc",
                "price_desc",
                "likes"
              ],
              "default": "sold_recently"
            }
          },
          {
            "name": "enrich",
            "in": "query",
            "required": false,
            "description": "Add seller location, sold count and ship time.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Poshmark sold listings.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "Keyword."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "More pages."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PoshmarkItem"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/depop/listings": {
      "get": {
        "operationId": "searchDepopListings",
        "tags": [
          "Resale marketplaces"
        ],
        "summary": "Depop listings (US, UK, Australia, Canada)",
        "description": "Current Depop listings by keyword with asking price, seller discount, shipping, brand, size, condition, color, seller and location, in each market's own currency. Depop does not publish site-wide sold prices.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Brand, model and item.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Depop market.",
            "schema": {
              "type": "string",
              "enum": [
                "us",
                "gb",
                "au",
                "ca"
              ],
              "default": "us"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Listings per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 48,
              "default": 24
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor from the previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Depop listings.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "The keyword searched."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page returned."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "Source of the rows."
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "How many rows match, when the source reports it."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows in this response."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "True while more rows are available."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DepopListing"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scrapedAt": {
                      "type": "string",
                      "description": "When the rows were read (ISO 8601)."
                    },
                    "country": {
                      "type": "string",
                      "description": "Market."
                    },
                    "count": {
                      "type": "integer",
                      "description": "Rows requested."
                    },
                    "totalListings": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Matching listings."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/grailed/sold": {
      "get": {
        "operationId": "searchGrailedSold",
        "tags": [
          "Resale marketplaces"
        ],
        "summary": "Grailed sold listings",
        "description": "Grailed sold listings with the price the buyer paid (the accepted offer when there was one), the asking price, sold date, shipping, size, condition and designer. Up to 1,000 rows per search.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Brand, model and item.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "description": "Department.",
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "menswear",
                "womenswear"
              ],
              "default": "any"
            }
          },
          {
            "name": "condition",
            "in": "query",
            "required": false,
            "description": "Condition.",
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "new",
                "gently_used",
                "used",
                "worn"
              ],
              "default": "any"
            }
          },
          {
            "name": "minPrice",
            "in": "query",
            "required": false,
            "description": "Lowest price, USD.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "required": false,
            "description": "Highest price, USD.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort.",
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "price_desc",
                "price_asc"
              ],
              "default": "recent"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Rows per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 40
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page, while page x count stays at or under 1,000.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Grailed sales.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "The keyword searched."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page returned."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "Source of the rows."
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "How many rows match, when the source reports it."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows in this response."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "True while more rows are available."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GrailedSale"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scrapedAt": {
                      "type": "string",
                      "description": "When the rows were read (ISO 8601)."
                    },
                    "count": {
                      "type": "integer",
                      "description": "Rows requested."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/grailed/listings": {
      "get": {
        "operationId": "searchGrailedListings",
        "tags": [
          "Resale marketplaces"
        ],
        "summary": "Grailed active listings",
        "description": "Current Grailed listings with asking price, US shipping, offers, size, condition, designer and listing time.\n\nCost: 1 request.",
        "parameters": [
          {
            "name": "keyword",
            "in": "query",
            "required": true,
            "description": "Brand, model and item.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "description": "Department.",
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "menswear",
                "womenswear"
              ],
              "default": "any"
            }
          },
          {
            "name": "condition",
            "in": "query",
            "required": false,
            "description": "Condition.",
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "new",
                "gently_used",
                "used",
                "worn"
              ],
              "default": "any"
            }
          },
          {
            "name": "minPrice",
            "in": "query",
            "required": false,
            "description": "Lowest price, USD.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "maxPrice",
            "in": "query",
            "required": false,
            "description": "Highest price, USD.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "description": "Sort.",
            "schema": {
              "type": "string",
              "enum": [
                "default",
                "newest",
                "price_asc",
                "price_desc"
              ],
              "default": "default"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Rows per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 40
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page, while page x count stays at or under 1,000.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Grailed listings.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-Usage-Remaining": {
                "$ref": "#/components/headers/X-Usage-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keyword": {
                      "type": "string",
                      "description": "The keyword searched."
                    },
                    "page": {
                      "type": "integer",
                      "description": "Page returned."
                    },
                    "marketplace": {
                      "type": "string",
                      "description": "Source of the rows."
                    },
                    "totalResults": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "How many rows match, when the source reports it."
                    },
                    "totalItems": {
                      "type": "integer",
                      "description": "Rows in this response."
                    },
                    "hasNextPage": {
                      "type": "boolean",
                      "description": "True while more rows are available."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GrailedListing"
                      }
                    },
                    "summary": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PriceSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "scrapedAt": {
                      "type": "string",
                      "description": "When the rows were read (ISO 8601)."
                    },
                    "count": {
                      "type": "integer",
                      "description": "Rows requested."
                    },
                    "totalListings": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Matching listings."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          },
          "503": {
            "$ref": "#/components/responses/Busy"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        }
      }
    },
    "/account/usage": {
      "get": {
        "operationId": "getAccountUsage",
        "tags": [
          "Account"
        ],
        "summary": "Plan and remaining monthly allowance",
        "description": "Your plan, quota, used and remaining requests, per-minute rate and period end. quota and remaining are null on the Unlimited plan.\n\nCost: Free.",
        "responses": {
          "200": {
            "description": "Usage.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "plan": {
                      "type": "string",
                      "description": "Plan."
                    },
                    "quota": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Monthly requests."
                    },
                    "used": {
                      "type": "integer",
                      "description": "Used this period."
                    },
                    "remaining": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Left this period."
                    },
                    "ratePerMinute": {
                      "type": "integer",
                      "description": "Per-minute limit."
                    },
                    "periodEnd": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Period end (ISO 8601)."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/account/requests": {
      "get": {
        "operationId": "listAccountRequests",
        "tags": [
          "Account"
        ],
        "summary": "Your request history (last 30 days)",
        "description": "Your own requests, newest first: endpoint, keyword, marketplace, outcome, status code, error code, rows returned and whether it was charged.\n\nCost: Free.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "success",
                "failed"
              ],
              "default": "all"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Rows.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "nextBefore from the previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Requests.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "windowDays": {
                      "type": "integer",
                      "description": "Days covered."
                    },
                    "count": {
                      "type": "integer",
                      "description": "Rows."
                    },
                    "nextBefore": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/status": {
      "get": {
        "operationId": "getStatus",
        "tags": [
          "Account"
        ],
        "summary": "Service health (no key needed)",
        "description": "Public health check for your monitoring.\n\nCost: Free, no key.",
        "security": [],
        "responses": {
          "200": {
            "description": "Health.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "ok or degraded."
                    },
                    "checkedAt": {
                      "type": "string",
                      "description": "Check time."
                    },
                    "components": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key from the dashboard (starts with eb_): Authorization: Bearer eb_..."
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Your plan's per-minute limit (window 60 seconds).",
        "schema": {
          "type": "integer"
        }
      },
      "X-Usage-Remaining": {
        "description": "Requests left this month after this call. Omitted on the Unlimited plan.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Every error has an HTTP status, a stable code and a message. Errors are never charged.",
        "properties": {
          "error": {
            "type": "string",
            "description": "Readable message."
          },
          "code": {
            "type": "string",
            "description": "Stable error code."
          }
        },
        "required": [
          "error",
          "code"
        ]
      },
      "PriceSummary": {
        "type": "object",
        "description": "Price summary of the returned rows.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of prices used."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency of the prices."
          },
          "median": {
            "type": [
              "number",
              "null"
            ],
            "description": "Median price."
          },
          "mean": {
            "type": [
              "number",
              "null"
            ],
            "description": "Mean price."
          },
          "min": {
            "type": [
              "number",
              "null"
            ],
            "description": "Lowest price."
          },
          "max": {
            "type": [
              "number",
              "null"
            ],
            "description": "Highest price."
          },
          "p25": {
            "type": [
              "number",
              "null"
            ],
            "description": "25th percentile."
          },
          "p75": {
            "type": [
              "number",
              "null"
            ],
            "description": "75th percentile."
          },
          "avgShipping": {
            "type": [
              "number",
              "null"
            ],
            "description": "Average shipping, when known."
          }
        }
      },
      "SoldListing": {
        "type": "object",
        "description": "One completed eBay sale. Active searches (sold=false) return currentPrice, currentPriceMax, currentCurrency, bidCount, timeLeft, acceptsOffers, watcherCount and unitsSold in place of the sold price and date.",
        "properties": {
          "itemId": {
            "type": "string",
            "description": "The eBay item ID."
          },
          "title": {
            "type": "string",
            "description": "Listing title as it appeared on eBay."
          },
          "soldPrice": {
            "type": "string",
            "description": "Final sale price as a decimal string, in the marketplace currency."
          },
          "soldCurrency": {
            "type": "string",
            "description": "ISO currency code: USD, GBP, EUR, AUD or CAD."
          },
          "endedAt": {
            "type": "string",
            "description": "Date the sale completed (YYYY-MM-DD)."
          },
          "condition": {
            "type": [
              "string",
              "null"
            ],
            "description": "Condition eBay recorded for the listing."
          },
          "buyingFormat": {
            "type": "string",
            "description": "How it sold: buyItNow or auction."
          },
          "bidCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Bids on auction listings."
          },
          "bestOfferAccepted": {
            "type": "boolean",
            "description": "True when the sale closed through an accepted Best Offer; soldPrice is then the listing price, an upper bound."
          },
          "acceptedOfferPrice": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only with bestOfferPrice=true: the price the buyer actually paid on an accepted Best Offer."
          },
          "acceptedOfferPriceStatus": {
            "type": "string",
            "description": "Only with bestOfferPrice=true, on accepted-offer rows.",
            "enum": [
              "found",
              "pending",
              "not_available"
            ]
          },
          "shippingPrice": {
            "type": [
              "string",
              "null"
            ],
            "description": "Shipping cost in the marketplace currency (\"0\" when free)."
          },
          "shippingType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Shipping model, for example free, flat or calculated."
          },
          "totalPrice": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sale price plus shipping."
          },
          "sellerUsername": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller username."
          },
          "url": {
            "type": "string",
            "description": "Direct link to the listing.",
            "format": "uri"
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Primary listing image."
          }
        }
      },
      "ScrapeResponse": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "description": "The keyword searched."
          },
          "ebaySite": {
            "type": "string",
            "description": "Marketplace searched.",
            "enum": [
              "ebay.com",
              "ebay.co.uk",
              "ebay.de",
              "ebay.com.au",
              "ebay.ca",
              "ebay.fr",
              "ebay.it",
              "ebay.es"
            ]
          },
          "count": {
            "type": "integer",
            "description": "Rows in this response."
          },
          "page": {
            "type": "integer",
            "description": "Page returned."
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "True while eBay has more results; request the next page."
          },
          "totalResults": {
            "type": [
              "integer",
              "null"
            ],
            "description": "eBay's rough match count for the keyword."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SoldListing"
            }
          }
        }
      },
      "PhotoSearchResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ScrapeResponse"
          },
          {
            "type": "object",
            "properties": {
              "identified": {
                "$ref": "#/components/schemas/Identified"
              },
              "requestsCharged": {
                "type": "integer",
                "description": "2 on success."
              }
            }
          }
        ]
      },
      "Identified": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "description": "The eBay search that was run."
          },
          "confidence": {
            "type": "number",
            "description": "0 to 1. Photos below 0.6 are refused rather than guessed."
          },
          "category": {
            "type": "string",
            "description": "trading_card, sneakers, electronics, clothing, toy, watch, collectible, media or other."
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "What was read from the photo: brand, model, variant, color, size, year, set, cardNumber, player, grader, grade (only the ones found)."
          }
        }
      },
      "BatchAccepted": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "description": "Job ID to poll."
          },
          "status": {
            "type": "string",
            "description": "Job status.",
            "enum": [
              "queued",
              "running",
              "complete"
            ]
          },
          "total": {
            "type": "integer",
            "description": "Keywords or listings in the job."
          },
          "resultsUrl": {
            "type": "string",
            "description": "Path to poll for results."
          }
        }
      },
      "SearchBatch": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "description": "Job ID."
          },
          "status": {
            "type": "string",
            "description": "Job status.",
            "enum": [
              "queued",
              "running",
              "complete"
            ]
          },
          "completed": {
            "type": "integer",
            "description": "Keywords finished."
          },
          "succeeded": {
            "type": "integer",
            "description": "Keywords that returned rows."
          },
          "failed": {
            "type": "integer",
            "description": "Keywords that failed (free)."
          },
          "total": {
            "type": "integer",
            "description": "Keywords in the job."
          },
          "ebaySite": {
            "type": "string",
            "description": "Marketplace."
          },
          "downloadUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "CSV download path."
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "keyword": {
                  "type": "string",
                  "description": "Keyword."
                },
                "status": {
                  "type": "string",
                  "description": "ok or failed."
                },
                "count": {
                  "type": "integer",
                  "description": "Rows."
                },
                "results": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SoldListing"
                  }
                },
                "code": {
                  "type": "string",
                  "description": "Error code when failed."
                },
                "error": {
                  "type": "string",
                  "description": "Message when failed."
                }
              }
            }
          }
        }
      },
      "ItemDetails": {
        "type": "object",
        "properties": {
          "itemId": {
            "type": "string",
            "description": "The eBay item ID."
          },
          "url": {
            "type": "string",
            "description": "Listing link."
          },
          "title": {
            "type": "string",
            "description": "Listing title."
          },
          "status": {
            "type": "string",
            "description": "Listing status.",
            "enum": [
              "sold",
              "ended",
              "active"
            ]
          },
          "soldDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sale time (ISO 8601)."
          },
          "endDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "End time (ISO 8601)."
          },
          "startDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Start time (ISO 8601)."
          },
          "price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sold price (winning bid for auctions), or the current price of an active listing."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency of price."
          },
          "condition": {
            "type": [
              "string",
              "null"
            ],
            "description": "eBay condition label."
          },
          "conditionDescription": {
            "type": [
              "string",
              "null"
            ],
            "description": "Definition of the condition label."
          },
          "sellerNotes": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the seller wrote about the condition."
          },
          "itemSpecifics": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Every item specific, label to value."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "The seller's description as plain text."
          },
          "seller": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller username."
          },
          "categoryPath": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "eBay category path."
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Full-size photo links."
          },
          "buyingFormat": {
            "type": [
              "string",
              "null"
            ],
            "description": "auction, auctionWithBIN or buyItNow."
          },
          "bidCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Bids on an auction; null for fixed price."
          },
          "quantityAvailable": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Units a buyer can still purchase."
          },
          "quantitySold": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Units sold on this listing."
          }
        }
      },
      "AuctionSale": {
        "type": "object",
        "properties": {
          "saleId": {
            "type": "string",
            "description": "Sale or lot ID."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to the lot."
          },
          "title": {
            "type": "string",
            "description": "Lot title."
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "What the buyer paid in USD, buyer's premium included where the house charges one."
          },
          "hammerPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Winning bid before the buyer's premium (Goldin)."
          },
          "buyersPremiumPercent": {
            "type": [
              "number",
              "null"
            ],
            "description": "Buyer's premium rate (Goldin; 1 on MySlabs)."
          },
          "shippingPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Shipping the buyer paid, when shown (MySlabs)."
          },
          "currency": {
            "type": "string",
            "description": "Currency, USD."
          },
          "soldAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sale time in UTC (ISO 8601). MySlabs gives the day only."
          },
          "saleType": {
            "type": [
              "string",
              "null"
            ],
            "description": "How it sold, for example Weekly, Elite, FIXED, PREMIER, Fixed price, Auction."
          },
          "bids": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of bids (Goldin)."
          },
          "gradingService": {
            "type": [
              "string",
              "null"
            ],
            "description": "Grading company."
          },
          "grade": {
            "type": [
              "string",
              "null"
            ],
            "description": "Grade."
          },
          "certNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The slab's certificate number (Fanatics Collect)."
          },
          "year": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Card year."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Lot image."
          }
        }
      },
      "WhatnotListing": {
        "type": "object",
        "properties": {
          "listingId": {
            "type": "string",
            "description": "Whatnot listing ID."
          },
          "url": {
            "type": "string",
            "description": "Listing link."
          },
          "title": {
            "type": "string",
            "description": "Listing title."
          },
          "subtitle": {
            "type": [
              "string",
              "null"
            ],
            "description": "Subtitle."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller description."
          },
          "format": {
            "type": "string",
            "description": "buy_it_now, auction (sold in a live show) or giveaway.",
            "enum": [
              "buy_it_now",
              "auction",
              "giveaway"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Listing status."
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "Buy It Now price, or the starting price of an auction."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "The listing's own currency (USD, GBP, EUR, CAD, AUD, JPY and others)."
          },
          "currentBid": {
            "type": [
              "number",
              "null"
            ],
            "description": "Current bid while an auction runs in a show."
          },
          "bidCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Bids so far while an auction runs."
          },
          "isLive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True while the auction is running in a show."
          },
          "showStartsAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the show that sells the listing starts (ISO 8601)."
          },
          "auctionEndsAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the auction ends, when known."
          },
          "quantity": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Quantity for sale."
          },
          "condition": {
            "type": [
              "string",
              "null"
            ],
            "description": "Condition the seller chose."
          },
          "graded": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for graded items."
          },
          "gradingService": {
            "type": [
              "string",
              "null"
            ],
            "description": "Grading service, for example PSA, BGS, CGC, SGC."
          },
          "grade": {
            "type": [
              "string",
              "null"
            ],
            "description": "Grade as the seller wrote it."
          },
          "certNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Grading cert number."
          },
          "autographed": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for autographed items."
          },
          "cardNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Card number as listed."
          },
          "set": {
            "type": [
              "string",
              "null"
            ],
            "description": "Card set."
          },
          "language": {
            "type": [
              "string",
              "null"
            ],
            "description": "Card language."
          },
          "rarity": {
            "type": [
              "string",
              "null"
            ],
            "description": "Rarity."
          },
          "productType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Product type, for example Card, Booster Box."
          },
          "attributes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Attribute name."
                },
                "value": {
                  "type": "string",
                  "description": "Attribute value."
                }
              }
            },
            "description": "Every detail the seller filled in."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category name."
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category ID, usable as the category filter."
          },
          "parentCategory": {
            "type": [
              "string",
              "null"
            ],
            "description": "Parent category."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "First photo."
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Every photo."
          },
          "sellerUsername": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller username."
          },
          "sellerUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller shop link."
          },
          "sellerRating": {
            "type": [
              "number",
              "null"
            ],
            "description": "Seller rating."
          },
          "sellerReviewCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Seller review count."
          },
          "sellerSoldCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Items the seller has sold."
          },
          "premierShop": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True for Premier Shop sellers."
          },
          "productId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Whatnot product ID."
          },
          "listedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it was listed (ISO 8601)."
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last update (ISO 8601)."
          }
        }
      },
      "WhatnotListingsResponse": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": [
              "string",
              "null"
            ],
            "description": "Keyword."
          },
          "page": {
            "type": "integer",
            "description": "Page."
          },
          "count": {
            "type": "integer",
            "description": "Rows requested."
          },
          "marketplace": {
            "type": "string",
            "description": "whatnot"
          },
          "format": {
            "type": "string",
            "description": "Format filter."
          },
          "sortBy": {
            "type": "string",
            "description": "Sort."
          },
          "seller": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller filter."
          },
          "totalResults": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Matching listings, when Whatnot reports it."
          },
          "totalItems": {
            "type": "integer",
            "description": "Rows."
          },
          "hasNextPage": {
            "type": "boolean",
            "description": "More pages."
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor for the next page."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WhatnotListing"
            }
          },
          "facets": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "description": "Value to pass back as a filter."
                  },
                  "label": {
                    "type": "string",
                    "description": "Display label."
                  },
                  "count": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Matching listings, when reported."
                  }
                }
              }
            },
            "description": "Filter values for this search, by parameter name."
          },
          "summary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "scrapedAt": {
            "type": "string",
            "description": "When the rows were read."
          }
        }
      },
      "BeckettCert": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string",
            "description": "The cert number asked for."
          },
          "marketplace": {
            "type": "string",
            "description": "beckett"
          },
          "certNumber": {
            "type": "string",
            "description": "The cert number, 10 digits, zero padded like the label."
          },
          "type": {
            "type": "string",
            "description": "Grading line.",
            "enum": [
              "BGS",
              "BVG",
              "BCCG"
            ]
          },
          "finalGrade": {
            "type": [
              "number",
              "null"
            ],
            "description": "Final grade, for example 9.5."
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "Label color as Beckett reports it, for example gold, silver, black, white."
          },
          "subgrades": {
            "type": [
              "object",
              "null"
            ],
            "description": "Null when the slab has no subgrades.",
            "properties": {
              "centering": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Centering."
              },
              "corners": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Corners."
              },
              "edges": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Edges."
              },
              "surface": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Surface."
              }
            }
          },
          "autographGrade": {
            "type": [
              "number",
              "null"
            ],
            "description": "Autograph grade, or null."
          },
          "setName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set as Beckett lists it."
          },
          "sport": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sport or game, for example Baseball, Pokemon."
          },
          "cardNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Card number."
          },
          "playerName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Player or card name."
          },
          "dateGraded": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date graded (YYYY-MM-DD)."
          },
          "population": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "total": {
                "type": "integer",
                "description": "Every copy of this card Beckett has graded."
              },
              "atGrade": {
                "type": "integer",
                "description": "Copies at this cert's grade."
              },
              "higher": {
                "type": "integer",
                "description": "Copies graded higher."
              },
              "byGrade": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "grade": {
                      "type": "string",
                      "description": "Grade."
                    },
                    "blackLabel": {
                      "type": "boolean",
                      "description": "True for the Black Label 10 row."
                    },
                    "count": {
                      "type": "integer",
                      "description": "Copies."
                    }
                  }
                },
                "description": "Count for every grade, highest first."
              }
            }
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Front photo when Beckett has one."
          },
          "beckettUrl": {
            "type": "string",
            "description": "The official Beckett record for this cert."
          },
          "scrapedAt": {
            "type": "string",
            "description": "When the cert was read (ISO 8601)."
          }
        }
      },
      "MercariItem": {
        "type": "object",
        "properties": {
          "itemId": {
            "type": "string",
            "description": "Mercari item ID."
          },
          "url": {
            "type": "string",
            "description": "Listing link."
          },
          "title": {
            "type": "string",
            "description": "Title."
          },
          "price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Displayed price in USD."
          },
          "currency": {
            "type": "string",
            "description": "USD."
          },
          "originalPrice": {
            "type": [
              "string",
              "null"
            ],
            "description": "Original price, when shown."
          },
          "condition": {
            "type": [
              "string",
              "null"
            ],
            "description": "Condition label."
          },
          "conditionId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Mercari condition ID."
          },
          "status": {
            "type": "string",
            "description": "sold or active.",
            "enum": [
              "sold",
              "active"
            ]
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Full image."
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Thumbnail."
          },
          "sellerId": {
            "type": [
              "string",
              "integer",
              "null"
            ],
            "description": "Seller ID."
          },
          "brand": {
            "type": [
              "string",
              "null"
            ],
            "description": "Brand."
          },
          "categoryId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Category ID."
          },
          "categoryName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category name."
          },
          "marketplace": {
            "type": "string",
            "description": "mercari"
          },
          "listedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only with includeListedAt=true: the posting time Mercari shows (ISO 8601 UTC). Not a sold date."
          }
        }
      },
      "PoshmarkItem": {
        "type": "object",
        "properties": {
          "listingId": {
            "type": "string",
            "description": "Poshmark listing ID."
          },
          "url": {
            "type": "string",
            "description": "Listing link."
          },
          "title": {
            "type": "string",
            "description": "Title."
          },
          "soldPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Displayed sold price in USD."
          },
          "originalPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Original retail price the seller entered."
          },
          "shippingCost": {
            "type": [
              "number",
              "null"
            ],
            "description": "Item-level shipping when Poshmark shows it, else null."
          },
          "brand": {
            "type": [
              "string",
              "null"
            ],
            "description": "Brand."
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "Size."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category."
          },
          "condition": {
            "type": [
              "string",
              "null"
            ],
            "description": "Condition code."
          },
          "nwt": {
            "type": "boolean",
            "description": "New With Tags."
          },
          "colors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description."
          },
          "soldAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sold time (ISO 8601)."
          },
          "listedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Original listing time (ISO 8601)."
          },
          "daysToSell": {
            "type": [
              "number",
              "null"
            ],
            "description": "Days from listing to sale."
          },
          "likesCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Likes."
          },
          "commentsCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Comments."
          },
          "shareCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Shares."
          },
          "sellerUsername": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller username."
          },
          "sellerLocation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller location (enrich=true)."
          },
          "sellerSoldCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Approximate seller sold count (enrich=true)."
          },
          "sellerAvgShipTime": {
            "type": [
              "number",
              "null"
            ],
            "description": "Seller average ship time (enrich=true)."
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Image."
          }
        }
      },
      "DepopListing": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "description": "Depop product ID."
          },
          "url": {
            "type": "string",
            "description": "Listing link."
          },
          "title": {
            "type": "string",
            "description": "First line of the seller's description."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Full description."
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "Asking price."
          },
          "originalPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price before the seller's discount, when discounted."
          },
          "shippingPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Shipping."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Currency of the listing."
          },
          "brand": {
            "type": [
              "string",
              "null"
            ],
            "description": "Brand."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category."
          },
          "sizes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "condition": {
            "type": [
              "string",
              "null"
            ],
            "description": "Brand new, Like new, Used excellent, Used good or Used fair."
          },
          "gender": {
            "type": [
              "string",
              "null"
            ],
            "description": "Gender."
          },
          "colors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "quantity": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Quantity."
          },
          "sellerUsername": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller."
          },
          "location": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller location."
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller country code."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Image."
          }
        }
      },
      "GrailedSale": {
        "type": "object",
        "properties": {
          "listingId": {
            "type": "string",
            "description": "Grailed listing ID."
          },
          "url": {
            "type": "string",
            "description": "Listing link."
          },
          "title": {
            "type": "string",
            "description": "Title."
          },
          "soldPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "What the buyer paid (an accepted offer when there was one), USD."
          },
          "listPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Asking price it sold from."
          },
          "shippingPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Shipping the buyer paid."
          },
          "soldPriceIncludesShipping": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when soldPrice already includes shipping."
          },
          "currency": {
            "type": "string",
            "description": "USD."
          },
          "soldAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sold time (ISO 8601)."
          },
          "designers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "Size."
          },
          "condition": {
            "type": [
              "string",
              "null"
            ],
            "description": "New, Gently used, Used or Very worn."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category."
          },
          "department": {
            "type": [
              "string",
              "null"
            ],
            "description": "menswear or womenswear."
          },
          "location": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller location."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Image."
          }
        }
      },
      "GrailedListing": {
        "type": "object",
        "properties": {
          "listingId": {
            "type": "string",
            "description": "Grailed listing ID."
          },
          "url": {
            "type": "string",
            "description": "Listing link."
          },
          "title": {
            "type": "string",
            "description": "Title."
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "Asking price, USD."
          },
          "currency": {
            "type": "string",
            "description": "USD."
          },
          "shippingPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "US shipping when offered."
          },
          "acceptsOffers": {
            "type": "boolean",
            "description": "True when the seller accepts offers."
          },
          "designers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "description": "Size."
          },
          "condition": {
            "type": [
              "string",
              "null"
            ],
            "description": "Condition."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category."
          },
          "department": {
            "type": [
              "string",
              "null"
            ],
            "description": "menswear or womenswear."
          },
          "location": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller location."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Image."
          },
          "listedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Listed time (ISO 8601)."
          },
          "bumpedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last bump (ISO 8601)."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "A parameter is missing or invalid; the message says which.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "properties": {
                    "code": {
                      "enum": [
                        "invalid_params"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid API key.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "properties": {
                    "code": {
                      "enum": [
                        "unauthorized"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "Monthly allowance used up, or the last subscription payment failed.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "properties": {
                    "code": {
                      "enum": [
                        "quota_exceeded",
                        "payment_required"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "RateLimited": {
        "description": "Per-minute limit reached. Retry after Retry-After seconds.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "properties": {
                    "code": {
                      "enum": [
                        "rate_limited"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "NotFound": {
        "description": "No such record, job or page.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "properties": {
                    "code": {
                      "enum": [
                        "not_found"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "Conflict": {
        "description": "A batch job is already running, or not finished yet.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "properties": {
                    "code": {
                      "enum": [
                        "conflict"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "UpstreamError": {
        "description": "The source temporarily refused or could not be reached. Retry shortly.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "properties": {
                    "code": {
                      "enum": [
                        "upstream_blocked",
                        "upstream_error"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "Busy": {
        "description": "The source is busy. Retry after Retry-After seconds.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "properties": {
                    "code": {
                      "enum": [
                        "server_busy",
                        "upstream_unavailable"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "Timeout": {
        "description": "The source took too long. Retry.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Error"
                },
                {
                  "properties": {
                    "code": {
                      "enum": [
                        "upstream_timeout"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      }
    }
  }
}