{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/socialtap-dev/json-schema/socialtap-dev-amazon-search-products-response-schema.json",
  "title": "AmazonSearch_productsResponse",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/socialtap-dev-openapi.json#/components/schemas/AmazonSearch_productsResponse",
  "properties": {
    "data": {
      "description": "Up to limit items (page size 60), Amazon's Newest Arrivals: the most recently listed first with sort=newest, Amazon's Best Sellers order: the most bought first with sort=popular, the lowest price first with sort=price_asc, the highest price first with sort=price_desc, Amazon's Featured order, sponsored results among them with sort=relevance.",
      "items": {
        "$ref": "#/$defs/Product"
      },
      "type": "array"
    },
    "meta": {
      "$ref": "#/$defs/ResponseMeta"
    },
    "page": {
      "$ref": "#/$defs/PageInfo"
    }
  },
  "required": [
    "data",
    "page",
    "meta"
  ],
  "type": "object",
  "$defs": {
    "AmazonCategory": {
      "properties": {
        "id": {
          "description": "Amazon's browse node ID of the category (what its category pages take as node=); null when the link names none.",
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "description": "Category name, as shown.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "type": "object"
    },
    "AmazonContributor": {
      "properties": {
        "name": {
          "description": "The contributor's name, as the byline shows it.",
          "type": "string"
        },
        "role": {
          "description": "Their role, as Amazon words it (Author, Narrator, Translator); null when the byline gives none.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name",
        "role"
      ],
      "type": "object"
    },
    "AmazonDeal": {
      "properties": {
        "badge": {
          "description": "The deal's badge, as shown (23% off, Up to 40% off); null when it shows none.",
          "type": [
            "string",
            "null"
          ]
        },
        "claimed_percent": {
          "description": "Share of the deal's units already claimed, in percent (0 to 100) as Amazon rounds it; null when Amazon shows none (most deals but lightning deals).",
          "format": "double",
          "maximum": 100,
          "minimum": 0,
          "type": [
            "number",
            "null"
          ]
        },
        "coupon_id": {
          "description": "Amazon's ID of the coupon's promotion (its page is amazon.com/promo/<id>); null when the product has no coupon.",
          "type": [
            "string",
            "null"
          ]
        },
        "coupon_price": {
          "description": "The price after the product's clippable coupon, in major units of the product's currency; null when it has no coupon or the coupon shows no price.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "department_ids": {
          "description": "The browse nodes Amazon's deals list files the deal under, in no particular order (one to several, from a department down to a sub-category): each is a category the Amazon Deals API takes. Empty when it names none.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "ends_at": {
          "description": "When the deal ends, RFC 3339 UTC, from the badge's countdown; null when the badge shows none (most deals but lightning deals).",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Amazon's ID of the deal; null for a product listed for its coupon alone.",
          "type": [
            "string",
            "null"
          ]
        },
        "label": {
          "description": "The deal's label, as shown (Limited time deal, Early Black Friday Deal, Limited Prime deal); null when the badge shows a countdown instead (see ends_at) or nothing.",
          "type": [
            "string",
            "null"
          ]
        },
        "original_price_label": {
          "description": "What original_price is: list (the list price), typical (the typical price of the last 90 days), rrp (the recommended retail price) or was (the price before the deal); null when no earlier price is shown or Amazon labels it otherwise. New values may be added; treat unknown values as null.",
          "enum": [
            "list",
            "typical",
            "rrp",
            "was",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "description": "The deal's state, as Amazon names it, lowercased (available: it can be bought at the deal price now); null for a coupon alone.",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "description": "The kind of deal, as Amazon names it, lowercased: lightning_deal (a limited number of units for a few hours), best_deal (a limited time deal), others as Amazon adds them; coupon when the product is listed for its coupon alone.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "type",
        "status",
        "badge",
        "label",
        "ends_at",
        "claimed_percent",
        "original_price_label",
        "department_ids",
        "coupon_price",
        "coupon_id"
      ],
      "type": "object"
    },
    "AmazonProductMetrics": {
      "properties": {
        "bought_past_month_count": {
          "description": "Units bought in the past month as Amazon's badge rounds them (10K+ is 10000): a lower bound; null when the page shows no badge.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "offer_count": {
          "description": "Offers from every seller, new and used, as the other sellers box counts them; null when the page shows no such box.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "rating_count": {
          "description": "Customer ratings behind rating (with or without a written review), exact.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "rating_distribution": {
          "anyOf": [
            {
              "$ref": "#/$defs/RatingDistribution"
            },
            {
              "type": "null"
            }
          ],
          "description": "Ratings per star, from the histogram's whole percentages times rating_count (so each can be off by half a percent of rating_count); null when unrated."
        }
      },
      "required": [
        "rating_count",
        "bought_past_month_count",
        "offer_count",
        "rating_distribution"
      ],
      "type": "object"
    },
    "AmazonProductSpecific": {
      "properties": {
        "availability_label": {
          "description": "The buy box's stock line, as Amazon words it (Only 1 left in stock - order soon.); null when the page shows none.",
          "type": [
            "string",
            "null"
          ]
        },
        "best_sellers_ranks": {
          "description": "The product's sales rank in each category Amazon ranks it in (#49 in Electronics, #7 in Earbud & In-Ear Headphones), department first; [] when the page shows none.",
          "items": {
            "$ref": "#/$defs/AmazonRank"
          },
          "type": "array"
        },
        "brand": {
          "description": "Brand name, as Amazon shows it; null when it shows none (most books: their authors are contributors).",
          "type": [
            "string",
            "null"
          ]
        },
        "categories": {
          "description": "The product's category path, from the department down to category (the last one); [] when the page shows none.",
          "items": {
            "$ref": "#/$defs/AmazonCategory"
          },
          "type": "array"
        },
        "contributors": {
          "description": "The people the byline credits (a book's authors, narrators and translators), in Amazon's order; [] when the byline names none.",
          "items": {
            "$ref": "#/$defs/AmazonContributor"
          },
          "type": "array"
        },
        "deal": {
          "anyOf": [
            {
              "$ref": "#/$defs/AmazonDeal"
            },
            {
              "type": "null"
            }
          ],
          "description": "The deal Amazon's deals list shows the product with: its type, badge, end time, share claimed and coupon; null outside a deals list."
        },
        "features": {
          "description": "The \"About this item\" bullet points, in Amazon's order; [] when the page has none (books, most media).",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "is_sponsored": {
          "description": "The product is a paid placement among a search's results (Amazon labels it Sponsored); null outside search results.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "metrics": {
          "$ref": "#/$defs/AmazonProductMetrics",
          "description": "Counts at fetch time; null = not shown, 0 = zero."
        },
        "parent_asin": {
          "description": "ASIN of the variation family this product belongs to (every color and size of it shares it); null for a product without variations.",
          "type": [
            "string",
            "null"
          ]
        },
        "rank": {
          "description": "Position in the requested Best Sellers or other ranked list (1 = top); null off a list.",
          "format": "int64",
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "rating": {
          "description": "Average customer rating out of 5 (metrics.rating_count ratings behind it), as Amazon shows it, to one decimal; null when unrated.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "ships_from": {
          "description": "Who ships the featured offer (Amazon, or the seller), as the buy box says; null when not shown.",
          "type": [
            "string",
            "null"
          ]
        },
        "variants": {
          "description": "Every variation of the product (its colors, sizes, styles), each an ASIN with its options, in Amazon's order; prices and stock are this product's only, so they are null on variants. [] for a product without variations.",
          "items": {
            "$ref": "#/$defs/ProductVariant"
          },
          "type": "array"
        }
      },
      "required": [
        "brand",
        "contributors",
        "rating",
        "metrics",
        "features",
        "is_sponsored",
        "categories",
        "best_sellers_ranks",
        "rank",
        "parent_asin",
        "variants",
        "availability_label",
        "ships_from",
        "deal"
      ],
      "type": "object"
    },
    "AmazonRank": {
      "properties": {
        "category": {
          "description": "Category name, as shown.",
          "type": "string"
        },
        "category_id": {
          "description": "Amazon's ID of the ranking: a browse node ID, or a department's slug (electronics) for a department's rank; null when the row links none.",
          "type": [
            "string",
            "null"
          ]
        },
        "rank": {
          "description": "The product's sales rank in the category (1 is the best seller).",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "rank",
        "category",
        "category_id"
      ],
      "type": "object"
    },
    "FacebookProductSpecific": {
      "properties": {
        "delivery_types": {
          "description": "How the item changes hands, as Marketplace lists it: in_person (local pickup), shipping, door_pickup, door_dropoff, public_meetup. [] when not shown (listed in unknown_fields). New values may be added.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "is_buy_now_enabled": {
          "description": "The item can be bought on Facebook with Marketplace checkout (Buy now); false: the buyer arranges payment with the seller.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "is_local_pickup": {
          "description": "The buyer can pick it up from the seller in person.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "latitude": {
          "description": "WGS 84 latitude of the listing's area in degrees (Facebook shows an area, not the seller's address: always listed in approximate_fields); set together with longitude.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "location": {
          "description": "Where the item is (a city or area, Austin, TX), as Marketplace shows it; null when not shown.",
          "type": [
            "string",
            "null"
          ]
        },
        "location_id": {
          "description": "Marketplace's ID of the city the item is in: a Marketplace search takes it as its location; null when not shown.",
          "type": [
            "string",
            "null"
          ]
        },
        "longitude": {
          "description": "WGS 84 longitude of the listing's area in degrees (always listed in approximate_fields); set together with latitude.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "postal_code": {
          "description": "Postal code of the listing's area, as Marketplace shows it (homes and rentals); null when not shown.",
          "type": [
            "string",
            "null"
          ]
        },
        "price_period": {
          "description": "The period price pays for: month for a property rental's monthly rent (Marketplace shows $914 / Month); null for a sale price. New values may be added.",
          "enum": [
            "month",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "published_at": {
          "description": "When it was listed, RFC 3339 UTC; null when not shown.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "seller_joined_at": {
          "description": "When the seller joined Facebook, RFC 3339 UTC; null when not shown.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "seller_rating": {
          "description": "The seller's average Marketplace rating as a seller, 1 to 5 stars; null when the seller's ratings are private or there are none.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "seller_rating_count": {
          "description": "Ratings behind seller_rating; null when the seller's ratings are private.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "location",
        "location_id",
        "published_at",
        "is_local_pickup",
        "latitude",
        "longitude",
        "delivery_types",
        "is_buy_now_enabled",
        "seller_rating",
        "seller_rating_count",
        "price_period",
        "postal_code",
        "seller_joined_at"
      ],
      "type": "object"
    },
    "InputRef": {
      "properties": {
        "id": {
          "description": "Platform-native ID of the item; null when it is only known after the fetch and the request failed.",
          "type": [
            "string",
            "null"
          ]
        },
        "kind": {
          "description": "What the input points to (profile, video, post, …). New values may be added; treat unknown values as other.",
          "type": "string"
        },
        "url": {
          "description": "Canonical URL of the item; null when unknown.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "id",
        "url"
      ],
      "type": "object"
    },
    "Media": {
      "properties": {
        "alt_text": {
          "description": "Accessibility text provided by the author or platform.",
          "type": [
            "string",
            "null"
          ]
        },
        "duration_ms": {
          "description": "Duration in milliseconds (video and audio only).",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "expires_at": {
          "description": "When url stops working, RFC 3339 UTC, read from the platform's signed URL; null when unknown or when it does not expire.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "height": {
          "description": "Height in pixels.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "thumbnail_url": {
          "description": "Poster or preview image URL.",
          "format": "uri",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "description": "Kind of file. New values may be added; treat unknown values as other.",
          "enum": [
            "image",
            "video",
            "audio",
            "gif"
          ],
          "type": "string"
        },
        "url": {
          "description": "Direct file URL; null when the platform withholds it, or when the link would only work from SocialTap's network or with a login. Often signed and expiring: see expires_at.",
          "format": "uri",
          "type": [
            "string",
            "null"
          ]
        },
        "width": {
          "description": "Width in pixels.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "type",
        "url",
        "expires_at",
        "thumbnail_url",
        "width",
        "height",
        "duration_ms",
        "alt_text"
      ],
      "type": "object"
    },
    "PageInfo": {
      "properties": {
        "end_reason": {
          "description": "Why there are no more pages; null while has_more is true. end: the list ended, or reached since/until. platform_limit: the platform stops serving further pages although the list goes on. max_pages: SocialTap's cap on pages in one walk. New values may be added. A short or empty page is not the end: only has_more false is.",
          "enum": [
            "end",
            "platform_limit",
            "max_pages",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "has_more": {
          "description": "True when another page exists; then next_cursor is set. An empty page with has_more true is not the end.",
          "type": "boolean"
        },
        "next_cursor": {
          "description": "Pass as cursor, with the same other parameters, to get the next page; null at the end.",
          "type": [
            "string",
            "null"
          ]
        },
        "next_cursor_expires_at": {
          "description": "When next_cursor stops working, RFC 3339 UTC; null at the end. Don't store cursors.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "has_more",
        "next_cursor",
        "next_cursor_expires_at",
        "end_reason"
      ],
      "type": "object"
    },
    "Product": {
      "properties": {
        "approximate_fields": {
          "description": "JSON paths of values rounded by the platform or parsed from display text (\"10K+ sold\"), and of Facebook's coarse listing coordinates. [] when all exact.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "attributes": {
          "description": "The product's specifications as name/value pairs, in the platform's order; [] when none.",
          "items": {
            "$ref": "#/$defs/ProductAttribute"
          },
          "type": "array"
        },
        "availability": {
          "description": "in_stock: can be bought now; out_of_stock: sold out for now (a product can be restocked); pre_order: ships later; pending: a listing with a sale pending; sold: a listing marked sold. Null when the platform does not say. New values may be added; treat unknown values as null.",
          "enum": [
            "in_stock",
            "out_of_stock",
            "pre_order",
            "pending",
            "sold",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "category": {
          "description": "The platform's most specific category label (Bicycles, Vitamins & Supplements), as shown; not normalized across platforms.",
          "type": [
            "string",
            "null"
          ]
        },
        "category_id": {
          "description": "The platform's ID of that category (what its category browsing and filters take).",
          "type": [
            "string",
            "null"
          ]
        },
        "condition": {
          "description": "Item condition, coarse: new, used (any grade) or refurbished; null when the platform does not say. The platform's own grade is condition_label. New values may be added; treat unknown values as used.",
          "enum": [
            "new",
            "used",
            "refurbished",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "condition_label": {
          "description": "The condition as the platform labels it (Used - Like New, Used - Good, Pre-owned).",
          "type": [
            "string",
            "null"
          ]
        },
        "country_code": {
          "description": "ISO 3166-1 alpha-2 market the product is offered in; prices, stock and shipping are that market's.",
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "description": "ISO 4217 code of every amount of this product (USD); null when no amount is shown.",
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "description": "Description as plain text (paragraphs separated by blank lines); null when it has none or the source does not show it (lists and search results).",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Platform-native product or listing ID (string).",
          "type": "string"
        },
        "max_price": {
          "description": "Highest current variant price, in major units of currency; equal to price when every variant costs the same; null when unknown (a source that shows one price).",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "media": {
          "description": "Product images in the platform's order (main image first), then any product video; [] when none.",
          "items": {
            "$ref": "#/$defs/Media"
          },
          "type": "array"
        },
        "original_price": {
          "description": "Price before the discount (the struck-through list price), in major units of currency; null when the platform shows no earlier price (not discounted, or not shown).",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "platform": {
          "description": "Platform ID (tiktokshop, facebook, …).",
          "type": "string"
        },
        "platform_specific": {
          "$ref": "#/$defs/ProductPlatformSpecific",
          "description": "Fields only this platform has, under its ID (platform_specific.<platform>): TikTok Shop's brand, rating, variants, stock and units sold; Marketplace's location and listing date. Each null when unknown."
        },
        "price": {
          "description": "Current price in major units of currency (58.47), discounts applied; for a product whose variants cost different amounts, the lowest (the platform's \"from\" price). Coupons and shipping excluded. 0 = free; null when not shown.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "seller": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProfileRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The shop or account selling it; null only when the source does not show it."
        },
        "shipping": {
          "$ref": "#/$defs/ProductShipping",
          "description": "Delivery terms as shown to a buyer in the product's market; each null when not shown."
        },
        "thumbnail_url": {
          "description": "Main product image URL. Platform CDN URLs can expire within hours.",
          "format": "uri",
          "type": [
            "string",
            "null"
          ]
        },
        "title": {
          "description": "Product name or listing title, as the seller wrote it.",
          "type": "string"
        },
        "type": {
          "description": "product: a catalog product a shop sells in many units, often in variants (TikTok Shop, Instagram and YouTube shopping); listing: a single item a person or business lists for sale (Facebook Marketplace). New values may be added; treat unknown values as product.",
          "enum": [
            "product",
            "listing"
          ],
          "type": "string"
        },
        "unknown_fields": {
          "description": "JSON paths of lists whose [] means unknown rather than none (a list or search result that does not show attributes or variants); null already means unknown for every other field. [] when every list is known.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "url": {
          "description": "Canonical product page URL.",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "platform",
        "id",
        "url",
        "type",
        "title",
        "description",
        "category",
        "category_id",
        "seller",
        "price",
        "max_price",
        "original_price",
        "currency",
        "availability",
        "condition",
        "condition_label",
        "thumbnail_url",
        "media",
        "attributes",
        "shipping",
        "country_code",
        "platform_specific",
        "approximate_fields",
        "unknown_fields"
      ],
      "type": "object"
    },
    "ProductAttribute": {
      "properties": {
        "name": {
          "description": "Specification name, as shown (Brand, Material, Condition).",
          "type": "string"
        },
        "value": {
          "description": "Its value, as shown.",
          "type": "string"
        }
      },
      "required": [
        "name",
        "value"
      ],
      "type": "object"
    },
    "ProductPlatformSpecific": {
      "properties": {
        "amazon": {
          "anyOf": [
            {
              "$ref": "#/$defs/AmazonProductSpecific"
            },
            {
              "type": "null"
            }
          ],
          "description": "An Amazon product's own fields."
        },
        "facebook": {
          "anyOf": [
            {
              "$ref": "#/$defs/FacebookProductSpecific"
            },
            {
              "type": "null"
            }
          ],
          "description": "A Facebook Marketplace listing's own fields."
        },
        "tiktokshop": {
          "anyOf": [
            {
              "$ref": "#/$defs/TikTokShopProductSpecific"
            },
            {
              "type": "null"
            }
          ],
          "description": "A TikTok Shop product's own fields."
        }
      },
      "type": "object"
    },
    "ProductShipping": {
      "properties": {
        "fee": {
          "description": "Standard shipping fee in major units of the product's currency; 0 = free shipping.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "is_offered": {
          "description": "The seller ships it (false: local pickup only).",
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "is_offered",
        "fee"
      ],
      "type": "object"
    },
    "ProductVariant": {
      "properties": {
        "availability": {
          "description": "Whether this variant can be bought now; null when not shown. New values may be added; treat unknown values as null.",
          "enum": [
            "in_stock",
            "out_of_stock",
            "pre_order",
            null
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Platform-native variant (SKU) ID; review.variant_id names it.",
          "type": "string"
        },
        "image_url": {
          "description": "Image of this variant (its color swatch or photo). Platform CDN URLs can expire within hours.",
          "format": "uri",
          "type": [
            "string",
            "null"
          ]
        },
        "options": {
          "description": "The option values that make this variant (Color: Black); [] for a product's only variant.",
          "items": {
            "$ref": "#/$defs/ProductVariantOption"
          },
          "type": "array"
        },
        "original_price": {
          "description": "This variant's price before the discount; null when no earlier price is shown.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "price": {
          "description": "Current price of this variant, in major units of the product's currency.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "stock_count": {
          "description": "Units in stock as the platform reports them (platforms may cap the number they show); null when hidden.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "title": {
          "description": "Variant name as shown, else its options joined (Color: Black, Size: M).",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "title",
        "options",
        "price",
        "original_price",
        "availability",
        "stock_count",
        "image_url"
      ],
      "type": "object"
    },
    "ProductVariantOption": {
      "properties": {
        "name": {
          "description": "Option name, as shown (Color, Size).",
          "type": "string"
        },
        "value": {
          "description": "The variant's value of it (Black, M).",
          "type": "string"
        }
      },
      "required": [
        "name",
        "value"
      ],
      "type": "object"
    },
    "ProfileRef": {
      "properties": {
        "avatar_url": {
          "description": "Profile picture URL. Platform CDN URLs can expire within hours.",
          "format": "uri",
          "type": [
            "string",
            "null"
          ]
        },
        "display_name": {
          "description": "Display name shown on the profile.",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Platform-native account ID; null when only the handle is known.",
          "type": [
            "string",
            "null"
          ]
        },
        "is_verified": {
          "description": "Platform verification badge; null where the platform has no badge.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "url": {
          "description": "Canonical profile URL.",
          "format": "uri",
          "type": [
            "string",
            "null"
          ]
        },
        "username": {
          "description": "Handle without the @; null when the account has none.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "username",
        "display_name",
        "url",
        "avatar_url",
        "is_verified"
      ],
      "type": "object"
    },
    "RatingDistribution": {
      "properties": {
        "five_star_count": {
          "description": "Reviews rating 5 stars.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "four_star_count": {
          "description": "Reviews rating 4 stars.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "one_star_count": {
          "description": "Reviews rating 1 star.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "three_star_count": {
          "description": "Reviews rating 3 stars.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "two_star_count": {
          "description": "Reviews rating 2 stars.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "one_star_count",
        "two_star_count",
        "three_star_count",
        "four_star_count",
        "five_star_count"
      ],
      "type": "object"
    },
    "ResponseMeta": {
      "properties": {
        "client_request_id": {
          "description": "Your x-client-request-id, echoed; null when you sent none.",
          "type": [
            "string",
            "null"
          ]
        },
        "credits_charged": {
          "description": "Credits charged for this request (0 for errors and cache hits).",
          "format": "int64",
          "type": "integer"
        },
        "credits_remaining": {
          "description": "Account balance after this request (the x-credits-remaining header); for a busy account an estimate that may not yet subtract concurrent requests (about a second of usage), never below the real balance; null when SocialTap could not read it.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "fetched_at": {
          "description": "When the data was fetched from the platform, RFC 3339 UTC (older than the request for cache hits).",
          "format": "date-time",
          "type": "string"
        },
        "input": {
          "anyOf": [
            {
              "$ref": "#/$defs/InputRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "What the request's url or handle resolved to: kind, platform ID and canonical URL, so you can confirm what was fetched; null for searches."
        },
        "is_cached": {
          "description": "True when served from the cache (free); see max_age.",
          "type": "boolean"
        },
        "latency_ms": {
          "description": "Time SocialTap spent on the request, in milliseconds.",
          "format": "int64",
          "type": "integer"
        },
        "platform": {
          "description": "Platform ID of the endpoint (youtube, tiktok, …).",
          "type": "string"
        },
        "request_id": {
          "description": "Unique request ID; include it when contacting support.",
          "type": "string"
        },
        "source": {
          "description": "Which upstream strategy produced the data.",
          "type": "string"
        },
        "warnings": {
          "description": "Things to act on that did not fail the request: a deprecated endpoint, partial data, items a list's walk leaves out. [] when none.",
          "items": {
            "$ref": "#/$defs/Warning"
          },
          "type": "array"
        }
      },
      "required": [
        "request_id",
        "platform",
        "source",
        "is_cached",
        "credits_charged",
        "latency_ms",
        "fetched_at",
        "input",
        "credits_remaining",
        "client_request_id",
        "warnings"
      ],
      "type": "object"
    },
    "TikTokShopProductMetrics": {
      "properties": {
        "rating_distribution": {
          "anyOf": [
            {
              "$ref": "#/$defs/RatingDistribution"
            },
            {
              "type": "null"
            }
          ],
          "description": "Reviews per star rating; null when TikTok Shop does not show the breakdown."
        },
        "review_count": {
          "description": "Reviews behind rating.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "sold_count": {
          "description": "Units sold across every market since the product was listed, as TikTok Shop counts them; null when not shown.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "stock_count": {
          "description": "Units in stock across every variant, as TikTok Shop reports them (it may cap the number it shows); null when hidden.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "sold_count",
        "review_count",
        "stock_count",
        "rating_distribution"
      ],
      "type": "object"
    },
    "TikTokShopProductSpecific": {
      "properties": {
        "brand": {
          "description": "Brand name, as TikTok Shop shows it; null when it shows none.",
          "type": [
            "string",
            "null"
          ]
        },
        "delivery_max_days": {
          "description": "Most days TikTok Shop estimates delivery takes in the product's market.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "delivery_min_days": {
          "description": "Fewest days TikTok Shop estimates delivery takes in the product's market.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "metrics": {
          "$ref": "#/$defs/TikTokShopProductMetrics",
          "description": "Counts at fetch time; null = hidden or not exposed, 0 = zero."
        },
        "rating": {
          "description": "Average review score out of 5 (metrics.review_count reviews behind it); null when unrated.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "shop": {
          "anyOf": [
            {
              "$ref": "#/$defs/TikTokShopShop"
            },
            {
              "type": "null"
            }
          ],
          "description": "The selling shop's rating and counts (seller names the shop); null when the page shows none."
        },
        "variants": {
          "description": "The purchasable variants (SKUs: a color, a size, a bundle), in TikTok Shop's order; [] for a product without variants (listed in unknown_fields when the source cannot see them).",
          "items": {
            "$ref": "#/$defs/ProductVariant"
          },
          "type": "array"
        }
      },
      "required": [
        "brand",
        "rating",
        "variants",
        "delivery_min_days",
        "delivery_max_days",
        "metrics",
        "shop"
      ],
      "type": "object"
    },
    "TikTokShopShop": {
      "properties": {
        "metrics": {
          "$ref": "#/$defs/TikTokShopShopMetrics",
          "description": "The shop's counts at fetch time; null = not shown, 0 = zero."
        },
        "rating": {
          "description": "The shop's average review score out of 5, shown to one decimal; null when the shop is unrated.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "rating",
        "metrics"
      ],
      "type": "object"
    },
    "TikTokShopShopMetrics": {
      "properties": {
        "follower_count": {
          "description": "Accounts following the shop.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "product_count": {
          "description": "Products the shop has on sale.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "review_count": {
          "description": "Reviews of the shop's products, behind its rating.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "sold_count": {
          "description": "Units the shop has sold across all its products and markets, as TikTok Shop counts them.",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "follower_count",
        "sold_count",
        "product_count",
        "review_count"
      ],
      "type": "object"
    },
    "Warning": {
      "properties": {
        "code": {
          "description": "Machine-readable warning code (see the warnings list). New codes may be added.",
          "type": "string"
        },
        "doc_url": {
          "description": "Where to read more (the changelog entry, the endpoint's docs).",
          "type": "string"
        },
        "fields": {
          "description": "partial_data: the output fields (catalog paths such as metrics.view_count) that are null or [] because part of the data could not be fetched; absent for other codes.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "message": {
          "description": "What to do about it.",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message",
        "doc_url"
      ],
      "type": "object"
    }
  }
}