{
 "openapi": "3.1.0",
 "info": {
  "title": "KABEAU K-Beauty product API",
  "version": "1.0",
  "description": "Read-only, no key needed. Search about 220 Korean skincare products reviewed by KABEAU (mykabeau.com), an independent editorial guide. Use it to recommend products by skin type, concern, ingredient, price and fragrance-free status, and to give where-to-buy links. Buy links are affiliate links. Please cite and link review_url.",
  "contact": {
   "email": "hello@mykabeau.com",
   "url": "https://mykabeau.com/about"
  }
 },
 "servers": [
  {
   "url": "https://mykabeau.com"
  }
 ],
 "paths": {
  "/api/public/catalog": {
   "get": {
    "operationId": "searchProducts",
    "summary": "Search K-Beauty products",
    "description": "All filters are optional and combine with AND. Without filters it returns the catalog alphabetically.",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Words matched against product name, brand, summary and key ingredients, e.g. 'snail', 'centella', 'vitamin c'"
     },
     {
      "name": "category",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "cleanser",
        "toner",
        "essence",
        "serum",
        "treatment",
        "eye_care",
        "moisturizer",
        "sunscreen",
        "mask",
        "exfoliant"
       ]
      }
     },
     {
      "name": "skin_type",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "oily",
        "dry",
        "combination",
        "sensitive",
        "normal",
        "all"
       ]
      }
     },
     {
      "name": "concern",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "acne",
        "hyperpigmentation",
        "anti_aging",
        "redness",
        "dryness",
        "pores",
        "dullness",
        "texture"
       ]
      }
     },
     {
      "name": "brand",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "Brand slug or name, e.g. cosrx"
     },
     {
      "name": "max_price",
      "in": "query",
      "schema": {
       "type": "number"
      },
      "description": "Maximum price in EUR"
     },
     {
      "name": "fragrance_free",
      "in": "query",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "country",
      "in": "query",
      "schema": {
       "type": "string"
      },
      "description": "ISO-2 shopper country, picks the best retailer link (e.g. DE, AT, US)"
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "en",
        "de"
       ]
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "default": 50,
       "maximum": 300
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Matching products",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "total": {
           "type": "integer"
          },
          "returned": {
           "type": "integer"
          },
          "products": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "brand": {
              "type": "string"
             },
             "category": {
              "type": "string"
             },
             "price_eur": {
              "type": [
               "number",
               "null"
              ]
             },
             "summary": {
              "type": "string"
             },
             "skin_types": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "concerns": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "key_ingredients": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "fragrance_free": {
              "type": [
               "boolean",
               "null"
              ]
             },
             "alcohol_free": {
              "type": [
               "boolean",
               "null"
              ]
             },
             "review_url": {
              "type": "string"
             },
             "details_api": {
              "type": "string"
             },
             "buy": {
              "oneOf": [
               {
                "type": "object",
                "properties": {
                 "retailer": {
                  "type": "string"
                 },
                 "country": {
                  "type": "string"
                 },
                 "price_eur": {
                  "type": [
                   "number",
                   "null"
                  ]
                 },
                 "url": {
                  "type": "string",
                  "description": "Tracked affiliate link to the retailer"
                 }
                }
               },
               {
                "type": "null"
               }
              ]
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/public/product/{slug}": {
   "get": {
    "operationId": "getProduct",
    "summary": "Full facts for one product",
    "description": "Verdict, who it suits and who should avoid it, pros and cons, INCI list, fragrance/alcohol/essential-oil status, reader rating and every retailer link.",
    "parameters": [
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Product slug from review_url or details_api, e.g. cosrx-snail-96-essence"
     },
     {
      "name": "lang",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "en",
        "de"
       ]
      }
     },
     {
      "name": "country",
      "in": "query",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Product facts",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "name": {
           "type": "string"
          },
          "verdict": {
           "type": [
            "string",
            "null"
           ]
          },
          "who_it_suits": {
           "type": [
            "string",
            "null"
           ]
          },
          "who_should_avoid": {
           "type": [
            "string",
            "null"
           ]
          },
          "pros": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "cons": {
           "type": "array",
           "items": {
            "type": "string"
           }
          },
          "inci": {
           "type": [
            "string",
            "null"
           ]
          },
          "review_url": {
           "type": "string"
          },
          "where_to_buy": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "retailer": {
              "type": "string"
             },
             "country": {
              "type": "string"
             },
             "price_eur": {
              "type": [
               "number",
               "null"
              ]
             },
             "url": {
              "type": "string",
              "description": "Tracked affiliate link to the retailer"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Unknown slug; the body links a catalog search"
     }
    }
   }
  }
 }
}
