{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upriver-ai/json-schema/upriver-ai-brand-product-input-schema.json",
  "title": "BrandProductInput",
  "description": "Input model for brand product research endpoint.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upriver-ai-products-api-openapi.yml#/components/schemas/BrandProductInput",
  "properties": {
    "brand_url": {
      "type": "string",
      "title": "Brand Url",
      "description": "Required. Brand website URL to research for products. HTTP URLs are upgraded to HTTPS. Provide this on every request, including pagination requests that also send a `cursor`."
    },
    "brand_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Brand Name",
      "description": "Deprecated — brand name is now resolved automatically from the URL. This field is accepted but ignored.",
      "deprecated": true
    },
    "response_format": {
      "$ref": "#/$defs/ResponseFormat",
      "description": "Format for the response: 'json' for structured data, 'text' for natural language",
      "default": "json"
    },
    "cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cursor",
      "description": "Use this to paginate through results, providing the `next_cursor` returned from a previous request. When set, `brand_url` is still required and must match the brand encoded in the cursor. If omitted, the first page of results is returned. "
    },
    "tier": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "primary",
            "secondary"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Tier",
      "description": "Optional product relationship filter: primary is what the business mainly sells or provides; secondary covers complementary or incidental offerings outside its main business. Omit to include all verified products, including those whose relationship cannot be established. Use the same filter on every pagination request."
    },
    "limit": {
      "type": "integer",
      "maximum": 20.0,
      "minimum": 1.0,
      "title": "Limit",
      "description": "Maximum products to return, from 1 to 20. Fewer may be returned when the website supports fewer offerings.",
      "default": 10
    },
    "include": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "enum": [
              "description",
              "image_url"
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Include",
      "description": "Which per-product fields to return. Allowed values: 'description', 'image_url'. Omit the field to get 'description' only (the default). Add 'image_url' to also get product images. An explicit empty list returns name, url, and tier when known. Unrequested fields are omitted. Example: [\"description\", \"image_url\"]"
    }
  },
  "type": "object",
  "required": [
    "brand_url"
  ],
  "$defs": {
    "ResponseFormat": {
      "type": "string",
      "enum": [
        "json",
        "text"
      ],
      "title": "ResponseFormat",
      "description": "Response format options for brand product research."
    }
  }
}