化妆品成分 API 文档
INCI 分析、安全评分、过敏原检测和肤质适配性端点的完整 API 参考。
化妆品 API 身份验证
所有对 INCI API 的请求都需要通过 X-API-Key 头部传入 API 密钥。可在 控制台 获取免费 API 密钥。
curl -X GET "https://api.inciapi.com/v1/products/3337875597913" \
-H "X-API-Key: sk_live_your_api_key"数据声明
Important Disclaimer
The ingredient safety data, scores, and ratings provided by INCI API are for informational and educational purposes only. This information is compiled from public databases and scientific literature, and may contain errors, omissions, or outdated information. INCI API does not guarantee the accuracy, completeness, or reliability of any data presented.
This service does not provide medical, dermatological, or health advice. Safety scores and ratings are algorithmic assessments based on available data and should not be used as a substitute for professional medical advice, diagnosis, or treatment. Always consult a qualified healthcare professional or dermatologist before making decisions about cosmetic products, especially regarding pregnancy safety, allergies, or skin conditions.
INCI API assumes no liability for any decisions made based on the information provided.
所有 API 响应均包含来自 EU CosIng、CIR 报告和已发表科学文献等公开来源的成分数据。无法保证准确性。安全评分是基于现有数据的算法估算,不构成临床评估。用户必须独立验证所有成分信息。完整条款请参阅 服务条款 和 API 许可协议。
INCI 分析 API 端点
/v1/products/:barcodeFree+通过条形码查询美妆产品。返回产品信息、品牌、INCI 列表和图片。
请求
curl -X GET "https://api.inciapi.com/v1/products/3337875597913" \
-H "X-API-Key: sk_live_your_api_key"响应
{
"success": true,
"data": {
"barcode": "3337875597913",
"name": "La Roche-Posay Toleriane Double Repair",
"brand": "La Roche-Posay",
"category": ["Skincare", "Moisturizer"],
"imageUrls": ["https://cdn.inciapi.com/..."],
"inciList": [
"Aqua", "Glycerin", "Dimethicone",
"Niacinamide", "Ceramide NP"
],
"vertical": "cosmetics",
"qualityScore": 92
}
}/v1/products/:barcode/safetyStarter+获取产品的完整安全分析,包括综合评分和每种成分的评分。
请求
curl -X GET "https://api.inciapi.com/v1/products/3337875597913/safety" \
-H "X-API-Key: sk_live_your_api_key"响应
{
"success": true,
"data": {
"overallSafetyScore": 92,
"cleanBeautyScore": 88,
"ingredients": [
{
"inciName": "Aqua",
"safetyRating": 1,
"functions": ["Solvent"],
"isAllergen": false,
"isPregnancySafe": true
},
{
"inciName": "Niacinamide",
"safetyRating": 1,
"functions": ["Antioxidant", "Brightening"],
"isAllergen": false,
"isPregnancySafe": true
},
{
"inciName": "Phenoxyethanol",
"safetyRating": 4,
"functions": ["Preservative"],
"isAllergen": false,
"isPregnancySafe": true
}
]
}
}/v1/products/:barcode/allergensStarter+获取产品的过敏原警告,对照欧盟 80 种强制过敏原、接触致敏物及防腐剂过敏原。
请求
curl -X GET "https://api.inciapi.com/v1/products/3337875597913/allergens" \
-H "X-API-Key: sk_live_your_api_key"响应
{
"success": true,
"data": {
"allergenWarnings": [
{
"inciName": "Linalool",
"allergenType": "EU Fragrance Allergen",
"severity": "moderate",
"description": "Common fragrance allergen, mandatory labeling in EU"
},
{
"inciName": "Citronellol",
"allergenType": "EU Fragrance Allergen",
"severity": "low",
"description": "Fragrance component, potential sensitizer"
}
],
"totalAllergens": 2,
"hasEuAllergens": true,
"hasContactSensitizers": false
}
}/v1/products/:barcode/compatibility?skinType=sensitive即将推出+检查肤质适配性。支持的肤质:油性、干性、敏感、混合、易长痘、中性。
请求
curl -X GET "https://api.inciapi.com/v1/products/3337875597913/compatibility?skinType=sensitive" \
-H "X-API-Key: sk_live_your_api_key"响应
{
"success": true,
"data": {
"skinType": "sensitive",
"compatible": true,
"score": 95,
"concerns": [],
"recommendations": [
"Product is fragrance-free",
"Contains ceramides (skin barrier support)",
"Contains niacinamide (anti-inflammatory)"
],
"allSkinTypes": [
{ "skinType": "sensitive", "compatible": true, "score": 95 },
{ "skinType": "dry", "compatible": true, "score": 90 },
{ "skinType": "oily", "compatible": true, "score": 82 },
{ "skinType": "combination", "compatible": true, "score": 88 },
{ "skinType": "acne-prone", "compatible": true, "score": 78 },
{ "skinType": "normal", "compatible": true, "score": 96 }
]
}
}/v1/products/:barcode/pregnancy即将推出+检查孕期安全。会标记维 A 类、水杨酸(BHA)、对苯二酚等孕期不宜成分。
请求
curl -X GET "https://api.inciapi.com/v1/products/3337875597913/pregnancy" \
-H "X-API-Key: sk_live_your_api_key"响应
{
"success": true,
"data": {
"pregnancySafe": true,
"warnings": [],
"flaggedIngredients": [],
"safeAlternatives": [],
"note": "No pregnancy-unsafe ingredients detected"
}
}/v1/analyze即将推出+在没有条形码的情况下分析原始 INCI 列表。提交成分名称即可获得完整安全分析。
请求
curl -X POST "https://api.inciapi.com/v1/analyze" \
-H "X-API-Key: sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"inci": [
"Aqua", "Glycerin", "Niacinamide",
"Cetearyl Alcohol", "Phenoxyethanol",
"Retinol", "Linalool"
]
}'响应
{
"success": true,
"data": {
"overallSafetyScore": 78,
"cleanBeautyScore": 72,
"ingredients": [
{ "inciName": "Aqua", "safetyRating": 1, "isAllergen": false, "isPregnancySafe": true },
{ "inciName": "Glycerin", "safetyRating": 1, "isAllergen": false, "isPregnancySafe": true },
{ "inciName": "Niacinamide", "safetyRating": 1, "isAllergen": false, "isPregnancySafe": true },
{ "inciName": "Retinol", "safetyRating": 7, "isAllergen": false, "isPregnancySafe": false },
{ "inciName": "Linalool", "safetyRating": 5, "isAllergen": true, "isPregnancySafe": true }
],
"allergenWarnings": [
{ "inciName": "Linalool", "allergenType": "EU Fragrance Allergen", "severity": "moderate" }
],
"pregnancySafe": false,
"pregnancyWarnings": ["Retinol: Vitamin A derivative, avoid during pregnancy"]
}
}/v1/ingredients/:inciNameFree+通过 INCI 名称获取特定成分的详细信息。
请求
curl -X GET "https://api.inciapi.com/v1/ingredients/Niacinamide" \
-H "X-API-Key: sk_live_your_api_key"响应
{
"success": true,
"data": {
"inciName": "Niacinamide",
"commonName": "Vitamin B3",
"casNumber": "98-92-0",
"safetyRating": 1,
"functions": ["Antioxidant", "Brightening", "Anti-inflammatory"],
"isAllergen": false,
"isPregnancySafe": true,
"comedogenicity": 0,
"suitableSkinTypes": ["oily", "dry", "sensitive", "combination", "acne-prone", "normal"],
"euStatus": "approved",
"description": "Well-researched skincare ingredient. Helps with hyperpigmentation, fine lines, and skin barrier function."
}
}/v1/ingredients/search?q=retinolFree+按名称或功能搜索成分,返回匹配成分及其安全数据。
请求
curl -X GET "https://api.inciapi.com/v1/ingredients/search?q=retinol&limit=5" \
-H "X-API-Key: sk_live_your_api_key"响应
{
"success": true,
"data": {
"ingredients": [
{
"inciName": "Retinol",
"safetyRating": 7,
"functions": ["Anti-Aging", "Cell Turnover"],
"isAllergen": false,
"isPregnancySafe": false
},
{
"inciName": "Retinyl Palmitate",
"safetyRating": 5,
"functions": ["Anti-Aging", "Antioxidant"],
"isAllergen": false,
"isPregnancySafe": false
}
],
"total": 2,
"page": 1,
"pageSize": 5
}
}/v1/products/submitFree+提交带 INCI 列表的缺失美妆产品。提交内容经过审核后将上线。
请求
curl -X POST "https://api.inciapi.com/v1/products/submit" \
-H "X-API-Key: sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"barcode": "1234567890123",
"name": "My Beauty Serum",
"brand": "Indie Beauty",
"inciList": ["Aqua", "Hyaluronic Acid", "Niacinamide"]
}'响应
{
"success": true,
"data": {
"submissionId": "sub_abc123",
"status": "pending_review",
"message": "Product submitted successfully. Will be available after moderation."
}
}化妆品 API 速率限制
成分分析 API 的速率限制取决于您的订阅等级。限制值通过响应头部返回。
| 套餐 | 限额 | 重置 |
|---|---|---|
| Free | 每天 100 次请求 | 每天 UTC 时间午夜 |
| Starter | 每月 5,000 次请求 | 每月计费日 |
响应头:
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4831
X-RateLimit-Reset: 1711929600INCI API 错误代码
| 代码 | 含义 | 处理方式 |
|---|---|---|
400 | 错误请求 | 检查请求参数和正文格式 |
401 | 未授权 | 检查 X-API-Key 头部中的 API 密钥 |
403 | 已禁止 | 该端点需要更高等级的套餐 |
404 | 未找到 | 产品或成分不在我们的数据库中 |
429 | 请求过多 | 等待 Retry-After 指定的秒数后重试 |
500 | 服务器内部错误 | 请稍后重试,若持续出现请联系支持 |
错误响应格式:
{
"success": false,
"error": {
"code": 404,
"message": "Product not found for barcode: 1234567890123"
}
}