Dokumentacja API składników kosmetycznych
Pełna dokumentacja API dla endpointów analizy INCI, oceny bezpieczeństwa, wykrywania alergenów i kompatybilności ze skórą.
Uwierzytelnianie API kosmetycznego
Wszystkie zapytania do INCI API wymagają klucza API wysyłanego w nagłówku X-API-Key. Pobierz darmowy klucz API z panelu.
curl -X GET "https://api.inciapi.com/v1/products/3337875597913" \
-H "X-API-Key: sk_live_your_api_key"Zastrzeżenie dot. danych
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.
Wszystkie odpowiedzi API zawierają dane składników skompilowane z publicznych źródeł, takich jak EU CosIng, raporty CIR i opublikowana literatura naukowa. Dokładność nie jest gwarantowana. Oceny bezpieczeństwa to algorytmiczne szacunki na podstawie dostępnych danych, nie oceny kliniczne. Użytkownicy muszą niezależnie weryfikować wszystkie informacje o składnikach. Zobacz nasz Regulamin i Umowę licencyjną API dla pełnych warunków.
Endpointy API analizy INCI
/v1/products/:barcodeFree+Wyszukaj produkt kosmetyczny po kodzie kreskowym. Zwraca informacje o produkcie, markę, listę INCI i obrazy.
Zapytanie
curl -X GET "https://api.inciapi.com/v1/products/3337875597913" \
-H "X-API-Key: sk_live_your_api_key"Odpowiedź
{
"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+Pobierz pełną analizę bezpieczeństwa produktu. Zawiera ogólny wynik bezpieczeństwa i oceny dla poszczególnych składników.
Zapytanie
curl -X GET "https://api.inciapi.com/v1/products/3337875597913/safety" \
-H "X-API-Key: sk_live_your_api_key"Odpowiedź
{
"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+Pobierz ostrzeżenia o alergenach dla produktu. Sprawdza listę 80 obowiązkowych alergenów UE, alergenów kontaktowych i alergenów konserwujących.
Zapytanie
curl -X GET "https://api.inciapi.com/v1/products/3337875597913/allergens" \
-H "X-API-Key: sk_live_your_api_key"Odpowiedź
{
"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=sensitiveWkrótce+Sprawdź kompatybilność z typem skóry. Obsługiwane typy: tłusta, sucha, wrażliwa, mieszana, skłonna do trądziku, normalna.
Zapytanie
curl -X GET "https://api.inciapi.com/v1/products/3337875597913/compatibility?skinType=sensitive" \
-H "X-API-Key: sk_live_your_api_key"Odpowiedź
{
"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/pregnancyWkrótce+Sprawdź bezpieczeństwo w ciąży. Oznacza retinoidy, kwas salicylowy (BHA), hydrochinon i inne składniki niezalecane w ciąży.
Zapytanie
curl -X GET "https://api.inciapi.com/v1/products/3337875597913/pregnancy" \
-H "X-API-Key: sk_live_your_api_key"Odpowiedź
{
"success": true,
"data": {
"pregnancySafe": true,
"warnings": [],
"flaggedIngredients": [],
"safeAlternatives": [],
"note": "No pregnancy-unsafe ingredients detected"
}
}/v1/analyzeWkrótce+Analizuj surową listę INCI bez kodu kreskowego. Wyślij nazwy składników i otrzymaj pełną analizę bezpieczeństwa.
Zapytanie
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"
]
}'Odpowiedź
{
"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+Pobierz szczegółowe informacje o konkretnym składniku po jego nazwie INCI.
Zapytanie
curl -X GET "https://api.inciapi.com/v1/ingredients/Niacinamide" \
-H "X-API-Key: sk_live_your_api_key"Odpowiedź
{
"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+Wyszukaj składniki po nazwie lub funkcji. Zwraca pasujące składniki z danymi bezpieczeństwa.
Zapytanie
curl -X GET "https://api.inciapi.com/v1/ingredients/search?q=retinol&limit=5" \
-H "X-API-Key: sk_live_your_api_key"Odpowiedź
{
"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+Zgłoś brakujący produkt kosmetyczny z jego listą INCI. Zgłoszone produkty są dostępne po moderacji.
Zapytanie
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"]
}'Odpowiedź
{
"success": true,
"data": {
"submissionId": "sub_abc123",
"status": "pending_review",
"message": "Product submitted successfully. Will be available after moderation."
}
}Limity zapytań API kosmetycznego
Limity zapytań API analizy składników zależą od poziomu subskrypcji. Limity są zwracane w nagłówkach odpowiedzi.
| Plan | Limit | Reset |
|---|---|---|
| Free | 100 zapytań/dzień | Codziennie o północy UTC |
| Starter | 5000 zapytań/mies. | Co miesiąc w dniu rozliczenia |
Nagłówki odpowiedzi:
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4831
X-RateLimit-Reset: 1711929600Kody błędów INCI API
| Kod | Znaczenie | Działanie |
|---|---|---|
400 | Nieprawidłowe zapytanie | Sprawdź parametry zapytania i format treści |
401 | Brak autoryzacji | Sprawdź klucz API w nagłówku X-API-Key |
403 | Brak dostępu | Endpoint wymaga wyższego planu |
404 | Nie znaleziono | Produkt lub składnik nie znajduje się w naszej bazie |
429 | Przekroczony limit zapytań | Poczekaj liczbę sekund z Retry-After, a następnie spróbuj ponownie |
500 | Wewnętrzny błąd serwera | Spróbuj później, skontaktuj się z pomocą, jeśli problem się utrzymuje |
Format odpowiedzi błędu:
{
"success": false,
"error": {
"code": 404,
"message": "Product not found for barcode: 1234567890123"
}
}