Документация API ингредиентов косметики
Полный справочник API для endpoint'ов анализа INCI, оценки безопасности, обнаружения аллергенов и совместимости с кожей.
Аутентификация Cosmetics API
Все запросы к INCI API требуют API-ключ, передаваемый в заголовке X-API-Key. Получите бесплатный 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 для полных условий.
Endpoint'ы API анализа INCI
/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Скоро+Проверьте безопасность при беременности. Отмечает ретиноиды, салициловую кислоту (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."
}
}Лимиты запросов Cosmetics API
Лимиты запросов API анализа ингредиентов зависят от уровня подписки. Лимиты возвращаются в заголовках ответа.
| Тариф | Лимит | Сброс |
|---|---|---|
| Free | 100 запросов/день | Ежедневно в полночь UTC |
| Starter | 5000 запросов/мес | Ежемесячно в дату оплаты |
Заголовки ответа:
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4831
X-RateLimit-Reset: 1711929600Коды ошибок INCI API
| Код | Значение | Действие |
|---|---|---|
400 | Некорректный запрос | Проверьте параметры и формат тела запроса |
401 | Не авторизован | Проверьте API-ключ в заголовке X-API-Key |
403 | Запрещено | Endpoint требует более высокого тарифа |
404 | Не найдено | Продукта или ингредиента нет в нашей базе |
429 | Лимит запросов превышен | Подождите указанное в Retry-After количество секунд и повторите |
500 | Внутренняя ошибка сервера | Повторите позже; обратитесь в поддержку, если ошибка сохраняется |
Формат ответа об ошибке:
{
"success": false,
"error": {
"code": 404,
"message": "Product not found for barcode: 1234567890123"
}
}