API reference
Documentation
Everything you need to integrate The Beauty API: 420,000 products, 26,000 ingredient records, and 390,000 hosted product images behind a uniform JSON interface.
Paste this into your CLAUDE.md, AGENTS.md or editor rules and your agent calls the API correctly without reading the docs. Also at https://thebeautyapi.com/agent.md.
Show the 23 lines ▾Hide ▴
# The Beauty API: instructions for coding agents
Base URL: https://api.thebeautyapi.com/v1 (JSON over HTTPS)
Auth: send the header x-api-key: $BEAUTY_API_KEY on every /v1 request. Keep the key in an environment variable, never in code or in this file.
Reference: https://thebeautyapi.com/docs.md | Spec: https://api.thebeautyapi.com/openapi.json | Keys: https://thebeautyapi.com/dashboard
## Endpoints
- Health: GET /health (no key)
- Search products: GET /v1/products/search?q=&page=
- Filter products: GET /v1/products?category=&brand=&origin=&fragrance_free=&alcohol_free=¶ben_free=&sulfate_free=&silicone_free=&has_ingredient=&excludes_ingredient=&page=
- Get a product: GET /v1/products/{id}
- Batch products: POST /v1/products/batch (body {"ids": [uuid, ...]}, max 50)
- Search ingredients: GET /v1/ingredients/search?q=&page=
- Get an ingredient: GET /v1/ingredients/{id}
## Rules
1. Find a product with search, then fetch the full record with GET /v1/products/{id}. Search and filter return slim records (id, brand, name, category, image_url, shade_name, size, pack_count, packaging, product_type, subcategory). Filter results also include countries_of_sale; detail and batch return the full product record. See Ingredients data in the reference for the flat, sectioned and component formats.
2. Every word in q must appear in the product's brand or name, in any order. Send the brand plus the distinctive part of the name ("CeraVe Moisturizing Cream"), never a full retail title. Case, accents and punctuation are ignored; the last word may be partial.
3. When pagination.total is 0 the response carries a no_match object: drop the word no_match.hint names and retry. An empty result does not mean the brand is missing.
4. Pages hold 20 results; page runs 1 to 51 and anything higher returns 400. Read pagination.total and pagination.has_more; above 1,020 matches, narrow with filters instead of paging.
5. Batch takes up to 50 ids and is billed per item (50 ids = 50 calls); unknown ids come back as null in the same positions.
6. Errors are JSON {statusCode, error, message} and message says what to change. 403 is a missing or revoked key. 429 is the rate limit; no rate-limit headers are sent, so back off exponentially.
7. image_url can be null.
8. Deduplication aliases resolve older product and ingredient IDs to surviving records. Unknown or retired ingredient IDs return 400 in ingredient filters.
On this page
Overview
The Beauty API is a REST API for a normalized catalog of beauty products and ingredients: 420,000 products, 26,000 ingredient records, and 7.1 million ingredient entries, refreshed once every two months. All endpoints accept and return JSON over HTTPS, and responses are compressed (brotli or gzip) when your client sends Accept-Encoding.
https://api.thebeautyapi.com/v1The API describes itself. A request to the root of the API (or to /v1) returns a discovery document listing every endpoint with its method, URL and summary, plus links to this reference and to the OpenAPI 3.1 spec, which is served live at /openapi.json. Neither needs an API key, so agents and SDK generators can start from the base URL alone.
curl https://api.thebeautyapi.com/ # endpoints, docs_url, openapi_url, authentication
curl https://api.thebeautyapi.com/openapi.json # OpenAPI 3.1 documentThis reference is also published as one plain markdown file at https://thebeautyapi.com/docs.md, with an index at https://thebeautyapi.com/llms.txt, so a coding agent can read the whole page in a single request instead of parsing this HTML.
Authentication
Every request under /v1 requires an API key in the x-api-key header. Keys are issued from your dashboard, with up to 2 active keys per account and create, reveal, and revoke available at any time. A missing, invalid, or revoked key returns 403. Only /health, the discovery document and /openapi.json are open.
curl "https://api.thebeautyapi.com/v1/products/search?q=retinol&page=1" \
-H "x-api-key: YOUR_API_KEY"Treat API keys as secrets. Call the API from your backend and never embed a key in client-side or mobile code: anyone who can read your key can spend your quota.
Quickstart
Set your key in the environment, then search the catalog from the language of your choice.
curl "https://api.thebeautyapi.com/v1/products/search?q=niacinamide&page=1" \
-H "x-api-key: $BEAUTY_API_KEY"const res = await fetch(
"https://api.thebeautyapi.com/v1/products/search?q=niacinamide&page=1",
{ headers: { "x-api-key": process.env.BEAUTY_API_KEY } },
);
const { results, pagination } = await res.json();import os, requests
res = requests.get(
"https://api.thebeautyapi.com/v1/products/search",
params={"q": "niacinamide", "page": 1},
headers={"x-api-key": os.environ["BEAUTY_API_KEY"]},
)
data = res.json()Endpoints
Products
Find a product by name, filter the catalog by attributes, then read the full record with its ingredient data. Barcode lookup and batch reads return the same full record.
/v1/products/searchSearch products
Search by brand and product name. Matching is strict: every word in q must appear in the product's brand or name, in any order. Case, accents and punctuation are ignored (punctuation splits words: Dr.Jart+ is searched as dr jart), and the last word may be partial (cera finds CeraVe), so it suits autocomplete. Returns product summaries with shade, size, pack count, packaging, product type and subcategory where available. Missing metadata is null. Follow up with the product endpoint for the full payload.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| q | query | string | Yes | Search text, 1–200 characters. Use the brand plus the distinctive part of the name, not the full retail title. |
| page | query | integer | No | Page number, 1–51. Optional; defaults to 1. 20 results per page. |
curl "https://api.thebeautyapi.com/v1/products/search?q=niacinamide&page=1" \
-H "x-api-key: $BEAUTY_API_KEY"const res = await fetch(
"https://api.thebeautyapi.com/v1/products/search?q=niacinamide&page=1",
{ headers: { "x-api-key": process.env.BEAUTY_API_KEY } },
);
const data = await res.json();import os, requests
res = requests.get(
"https://api.thebeautyapi.com/v1/products/search",
params={"q": "niacinamide", "page": 1},
headers={"x-api-key": os.environ["BEAUTY_API_KEY"]},
)
data = res.json(){
"results": [
{
"id": "54cec99d-f529-5356-965f-f1b6be36ba83",
"brand": "AR Niacinamide Cream",
"name": "AR Niacinamide Cream",
"category": "skincare",
"image_url": "https://images.thebeautyapi.com/54cec99d-f529-5356-965f-f1b6be36ba83.jpg",
"shade_name": null,
"size": null,
"pack_count": null,
"packaging": null,
"product_type": null,
"subcategory": "moisturizer"
},
{
"id": "2ffadd1c-d3a7-59c6-a02e-932e64b6e570",
"brand": "Advance purity niacinamide",
"name": "Advance purity niacinamide",
"category": "skincare",
"image_url": "https://images.thebeautyapi.com/2ffadd1c-d3a7-59c6-a02e-932e64b6e570.jpg",
"shade_name": null,
"size": null,
"pack_count": null,
"packaging": null,
"product_type": null,
"subcategory": "moisturizer"
}
],
"pagination": {
"page": 1,
"has_more": true,
"total": 2379
}
}| Query | Result |
|---|---|
| q=CeraVe Moisturizing Cream | ✓CeraVe Moisturizing Cream and its variants (Baby, Intensive, Psoriasis, For Dry To Very Dry Skin…) |
| q=CeraVe Moisturizing Cream Daily Face and Body Moisturizer for Dry Skin | ✗No stored product matches all the search terms. The response's no_match.hint names the least specific word to drop, and no_match.terms shows each word's own match count. |
| q=Laneige sleeping mask | ✓Every LANEIGE sleeping mask (Water, Lip, Cica, Time Freeze…) |
Notes:
- 01An empty
resultsarray means no product has all of those words. It does not mean the brand is missing. - 02When
totalis 0 the response carriesno_match:hintnames the word to drop, andtermsgives each word's own match count. Drop the word that matches nothing (a typo, a receipt line number) or the least specific one (serum, cream, SPF) and retry. - 03Send brand + short name from the start, never a full listing title.
- 04Words split on anything that is not a letter or digit:
Oil-Freesearches asoilandfree,10%as10. Only the first 10 words count. - 05A query with no letters or digits returns
400.
/v1/productsFilter products
Discover products by category, brand, origin, formulation flags, and ingredient composition. All filters combine with AND. Returns the same fields as search, plus countries_of_sale for recorded sales markets.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| category | query | string | No | Exact, case-sensitive match on the stored category: skincare, suncare, makeup, nails, haircare, body/bath, fragrance, other, deodorants, oral-care, tools_accessories or devices. Any other value returns an empty page with no_match, not an error. |
| brand | query | string | No | Brand name. Case, accents, punctuation and spaces are ignored: supergoop finds Supergoop!, sk ii finds SK-II. Misspellings are not corrected; use search to find the stored brand string. |
| origin | query | string | No | Exact, case-sensitive match on the brand's country of origin as stored, e.g. USA, South Korea, France, United Kingdom. Unknown for ~62% of products, which no origin value matches. |
| fragrance_free | query | boolean | No | Formulation flags. Also: alcohol_free, paraben_free, sulfate_free, silicone_free. |
| has_ingredient | query | uuid | No | Only products containing this ingredient. Ingredient IDs come from the ingredient endpoints. |
| excludes_ingredient | query | uuid list | No | Only products containing none of these ingredients. Comma-separated, up to 10. |
| page | query | integer | No | Page number, 1–51. Optional; defaults to 1. 20 results per page. |
curl "https://api.thebeautyapi.com/v1/products?category=skincare&fragrance_free=true&has_ingredient=a1526dea-37d1-5904-9106-be583378339b&page=1" \
-H "x-api-key: $BEAUTY_API_KEY"const res = await fetch(
"https://api.thebeautyapi.com/v1/products?category=skincare&fragrance_free=true&has_ingredient=a1526dea-37d1-5904-9106-be583378339b&page=1",
{ headers: { "x-api-key": process.env.BEAUTY_API_KEY } },
);
const data = await res.json();import os, requests
res = requests.get(
"https://api.thebeautyapi.com/v1/products",
params={"category": "skincare", "fragrance_free": True, "has_ingredient": "a1526dea-37d1-5904-9106-be583378339b", "page": 1},
headers={"x-api-key": os.environ["BEAUTY_API_KEY"]},
)
data = res.json(){
"results": [
{
"id": "a70e8e5b-5905-57f9-8e8a-acd9feaa43c2",
"brand": "IOPE",
"name": "Bio Essence Intensive Conditioning",
"category": "skincare",
"image_url": "https://images.thebeautyapi.com/a70e8e5b-5905-57f9-8e8a-acd9feaa43c2.jpg",
"shade_name": null,
"size": null,
"pack_count": null,
"packaging": null,
"countries_of_sale": null,
"product_type": null,
"subcategory": "toner-essence"
},
{
"id": "7ebe8574-c405-51e0-a597-f9ce33bc7b95",
"brand": "Biologique Recherche",
"name": "Lotion P50 T",
"category": "skincare",
"image_url": "https://images.thebeautyapi.com/7ebe8574-c405-51e0-a597-f9ce33bc7b95.jpg",
"shade_name": null,
"size": null,
"pack_count": null,
"packaging": null,
"countries_of_sale": null,
"product_type": null,
"subcategory": "serum"
}
],
"pagination": {
"page": 1,
"has_more": true,
"total": 12651
}
}Notes:
- 01Unknown or retired ingredient IDs return
400in either ingredient filter. Recorded aliases resolve to the surviving ingredient after deduplication; see Ingredients data. - 02When
totalis 0,no_match.hintexplains why no products match the supplied filters.
/v1/products/{id}Get a product
The complete record: brand, category, origin, formulation flags, hosted image URL, and ingredient data in label order, with available names, functions, ratings and chemical identifiers.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | Yes | Product ID. |
curl https://api.thebeautyapi.com/v1/products/06d9476a-397b-5f61-abc8-640b30a9ae23 \
-H "x-api-key: $BEAUTY_API_KEY"const res = await fetch(
"https://api.thebeautyapi.com/v1/products/06d9476a-397b-5f61-abc8-640b30a9ae23",
{ headers: { "x-api-key": process.env.BEAUTY_API_KEY } },
);
const data = await res.json();import os, requests
res = requests.get(
"https://api.thebeautyapi.com/v1/products/06d9476a-397b-5f61-abc8-640b30a9ae23",
headers={"x-api-key": os.environ["BEAUTY_API_KEY"]},
)
data = res.json(){
"id": "06d9476a-397b-5f61-abc8-640b30a9ae23",
"brand": "The Ordinary",
"name": "Niacinamide 10% + Zinc 1%",
"image_url": "https://images.thebeautyapi.com/06d9476a-397b-5f61-abc8-640b30a9ae23.jpg",
"category": "skincare",
"origin": "Canada",
"contains_fragrance": false,
"contains_drying_alcohol": false,
"contains_parabens": false,
"contains_sulfates": false,
"contains_silicones": false,
"product_type": null,
"subcategory": "serum",
"size": null,
"packaging": null,
"countries_of_sale": null,
"pack_count": null,
"shade_name": null,
"benefits": null,
"directions": null,
"warnings": null,
"ingredients_raw": "Aqua (Water), Niacinamide 10.0%, Pentylene Glycol, Zinc Pca 1.0%, Dimethyl Isosorbide, Tamarindus Indica Seed Gum, Xanthan Gum, Isoceteth-20, Ethoxydiglycol, Phenoxyethanol, Chlorphenesin",
"ingredients": [
{
"position": 0,
"label_name": "Aqua (Water)",
"concentration": null,
"id": "2ba7df6d-7d8a-5935-af3a-f0bb7f03fb53",
"name": "Water",
"rating": null,
"irritancy": null,
"comedogenicity": null,
"functions": [
"solvent"
],
"cas_number": "7732-18-5",
"ec_number": "231-791-2",
"ph_eur_name": "Aqua",
"iupac_name": null,
"other_names": "Aqua",
"category": null
},
{
"position": 1,
"label_name": "Niacinamide 10.0%",
"concentration": 10,
"id": "a1526dea-37d1-5904-9106-be583378339b",
"name": "Niacinamide",
"rating": "direct actives",
"irritancy": null,
"comedogenicity": null,
"functions": [
"smoothing"
],
"cas_number": "98-92-0",
"ec_number": "202-713-4",
"ph_eur_name": "Nicotinamidum",
"iupac_name": "3-Pyridinecarboxamide",
"other_names": "vitamin B3, nicotinamide",
"category": null
}
]
}Notes:
- 01Full product records include product-level
ingredients_raw, product metadata, and flat, sectioned or component formulas with nullable ingredient identities and flags. See Ingredients data. - 02Deduplication aliases preserve older product IDs; an aliased lookup returns the surviving product and its ID.
- 03
concentrationis present only where the manufacturer discloses it publicly. It is never estimated. - 04Barcodes are never in this payload, on any plan. Barcode-enabled plans resolve a GTIN to a product with Barcode lookup.
/v1/products/barcode/{barcode}Barcode lookup
Resolve a scanned or catalog barcode (UPC-A, EAN-13, GTIN-8/14) to its product and return the same complete record as Get a product. Unit codes, multipack codes and sibling-variant codes (shade/scent/size of the same line) all resolve, and any zero-padded GTIN form of the same code (UPC-A, EAN-13, GTIN-14) is treated as identical. Barcode-enabled plans only.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| barcode | path | string | Yes | 8–14 digits, no spaces or dashes (^[0-9]{8,14}$). |
curl https://api.thebeautyapi.com/v1/products/barcode/769915195941 \
-H "x-api-key: $BEAUTY_API_KEY"const res = await fetch(
"https://api.thebeautyapi.com/v1/products/barcode/769915195941",
{ headers: { "x-api-key": process.env.BEAUTY_API_KEY } },
);
const data = await res.json();import os, requests
res = requests.get(
"https://api.thebeautyapi.com/v1/products/barcode/769915195941",
headers={"x-api-key": os.environ["BEAUTY_API_KEY"]},
)
data = res.json(){
"id": "06d9476a-397b-5f61-abc8-640b30a9ae23",
"brand": "The Ordinary",
"name": "Niacinamide 10% + Zinc 1%",
"image_url": "https://images.thebeautyapi.com/06d9476a-397b-5f61-abc8-640b30a9ae23.jpg",
"category": "skincare",
"origin": "Canada",
"contains_fragrance": false,
"contains_drying_alcohol": false,
"contains_parabens": false,
"contains_sulfates": false,
"contains_silicones": false,
"product_type": null,
"subcategory": "serum",
"size": null,
"packaging": null,
"countries_of_sale": null,
"pack_count": null,
"shade_name": null,
"benefits": null,
"directions": null,
"warnings": null,
"ingredients_raw": "Aqua (Water), Niacinamide 10.0%, Pentylene Glycol, Zinc Pca 1.0%, Dimethyl Isosorbide, Tamarindus Indica Seed Gum, Xanthan Gum, Isoceteth-20, Ethoxydiglycol, Phenoxyethanol, Chlorphenesin",
"ingredients": [
{
"position": 0,
"label_name": "Aqua (Water)",
"concentration": null,
"id": "2ba7df6d-7d8a-5935-af3a-f0bb7f03fb53",
"name": "Water",
"rating": null,
"irritancy": null,
"comedogenicity": null,
"functions": [
"solvent"
],
"cas_number": "7732-18-5",
"ec_number": "231-791-2",
"ph_eur_name": "Aqua",
"iupac_name": null,
"other_names": "Aqua",
"category": null
},
{
"position": 1,
"label_name": "Niacinamide 10.0%",
"concentration": 10,
"id": "a1526dea-37d1-5904-9106-be583378339b",
"name": "Niacinamide",
"rating": "direct actives",
"irritancy": null,
"comedogenicity": null,
"functions": [
"smoothing"
],
"cas_number": "98-92-0",
"ec_number": "202-713-4",
"ph_eur_name": "Nicotinamidum",
"iupac_name": "3-Pyridinecarboxamide",
"other_names": "vitamin B3, nicotinamide",
"category": null
}
]
}Notes:
- 01The response never lists the product's barcodes. The API resolves a code to a product; it does not enumerate codes. The full GTIN list ships only with the licensed dataset.
- 02
403when your plan has no barcode lookup (the message reads “Your current plan does not include Barcode Lookup access.”).404when nothing matches.400for malformed input. - 03Bills 1 item.
- 04Roughly 75% of the catalog carries a code today; coverage grows with each refresh.
/v1/products/batchBatch products
Fetch up to 50 complete product records in one request. The response array has the same length and order as the ids you send; unknown IDs come back as null.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| ids | body | uuid[] | Yes | 1–50 product IDs. |
curl -X POST https://api.thebeautyapi.com/v1/products/batch \
-H "x-api-key: $BEAUTY_API_KEY" \
-H "content-type: application/json" \
-d '{"ids": ["06d9476a-397b-5f61-abc8-640b30a9ae23", "00000000-0000-0000-0000-000000000000"]}'const res = await fetch("https://api.thebeautyapi.com/v1/products/batch", {
method: "POST",
headers: {
"x-api-key": process.env.BEAUTY_API_KEY,
"content-type": "application/json",
},
body: JSON.stringify({ ids: ["06d9476a-397b-5f61-abc8-640b30a9ae23", "00000000-0000-0000-0000-000000000000"] }),
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.thebeautyapi.com/v1/products/batch",
json={"ids": ["06d9476a-397b-5f61-abc8-640b30a9ae23", "00000000-0000-0000-0000-000000000000"]},
headers={"x-api-key": os.environ["BEAUTY_API_KEY"]},
)
data = res.json()[
{
"id": "06d9476a-397b-5f61-abc8-640b30a9ae23",
"brand": "The Ordinary",
"name": "Niacinamide 10% + Zinc 1%",
"image_url": "https://images.thebeautyapi.com/06d9476a-397b-5f61-abc8-640b30a9ae23.jpg",
"category": "skincare",
"origin": "Canada",
"contains_fragrance": false,
"contains_drying_alcohol": false,
"contains_parabens": false,
"contains_sulfates": false,
"contains_silicones": false,
"product_type": null,
"subcategory": "serum",
"size": null,
"packaging": null,
"countries_of_sale": null,
"pack_count": null,
"shade_name": null,
"benefits": null,
"directions": null,
"warnings": null,
"ingredients_raw": "Aqua (Water), Niacinamide 10.0%, Pentylene Glycol, Zinc Pca 1.0%, Dimethyl Isosorbide, Tamarindus Indica Seed Gum, Xanthan Gum, Isoceteth-20, Ethoxydiglycol, Phenoxyethanol, Chlorphenesin",
"ingredients": [
{
"position": 0,
"label_name": "Aqua (Water)",
"concentration": null,
"id": "2ba7df6d-7d8a-5935-af3a-f0bb7f03fb53",
"name": "Water",
"rating": null,
"irritancy": null,
"comedogenicity": null,
"functions": [
"solvent"
],
"cas_number": "7732-18-5",
"ec_number": "231-791-2",
"ph_eur_name": "Aqua",
"iupac_name": null,
"other_names": "Aqua",
"category": null
},
{
"position": 1,
"label_name": "Niacinamide 10.0%",
"concentration": 10,
"id": "a1526dea-37d1-5904-9106-be583378339b",
"name": "Niacinamide",
"rating": "direct actives",
"irritancy": null,
"comedogenicity": null,
"functions": [
"smoothing"
],
"cas_number": "98-92-0",
"ec_number": "202-713-4",
"ph_eur_name": "Nicotinamidum",
"iupac_name": "3-Pyridinecarboxamide",
"other_names": "vitamin B3, nicotinamide",
"category": null
}
]
},
null
]Notes:
- 01Each non-null item uses the same product format as Get a product, including the ingredient structures and deduplication aliases described in Ingredients data.
- 02Send JSON with
Content-Type: application/json. A missing or unrecognised content type returns415. - 03A body that is not valid JSON, or
idsmissing, empty, over 50 or not UUIDs, returns400. - 04Billed per item: a batch of 50 counts as 50 calls. The
X-Item-Countresponse header carries the billable count. - 05Rate limits and the 100-request trial allowance count requests, so a batch is one request against those. Trial calls never incur overage.
Endpoints
Ingredients
Search the ingredient dictionary by INCI name or synonym, then read an ingredient's full record: functional classes, irritancy and comedogenicity ratings, and chemical identifiers. Use the IDs with the product filters.
/v1/ingredients/searchSearch ingredients
Search the 26,000-record ingredient dictionary by canonical INCI name and known synonyms. Use the returned IDs with the product filters or the ingredient endpoint.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| q | query | string | Yes | Search text, 1–200 characters. |
| page | query | integer | No | Page number, 1–51. Optional; defaults to 1. 20 results per page. |
curl "https://api.thebeautyapi.com/v1/ingredients/search?q=niacinamide&page=1" \
-H "x-api-key: $BEAUTY_API_KEY"const res = await fetch(
"https://api.thebeautyapi.com/v1/ingredients/search?q=niacinamide&page=1",
{ headers: { "x-api-key": process.env.BEAUTY_API_KEY } },
);
const data = await res.json();import os, requests
res = requests.get(
"https://api.thebeautyapi.com/v1/ingredients/search",
params={"q": "niacinamide", "page": 1},
headers={"x-api-key": os.environ["BEAUTY_API_KEY"]},
)
data = res.json(){
"results": [
{
"id": "a1526dea-37d1-5904-9106-be583378339b",
"name": "Niacinamide",
"other_names": "vitamin B3, nicotinamide",
"rating": "direct actives"
},
{
"id": "e0788047-91e6-5041-aedc-54d2d8c4c025",
"name": "Niacinamide Retinoate",
"other_names": null,
"rating": null
},
{
"id": "d38b26f6-cdf1-53fd-ae1b-b0de434064af",
"name": "Niacinamide (NIA-114™)",
"other_names": null,
"rating": null
},
{
"id": "83b58d16-4775-5b15-91cd-04e1ff64be99",
"name": "Niacinamide Polypeptide",
"other_names": null,
"rating": null
},
{
"id": "dd34f14a-7142-5884-bb1e-dd78cc03ef84",
"name": "Niacinamide (Soy-Derived)",
"other_names": null,
"rating": null
},
{
"id": "80df0bd2-443b-590c-a7fd-45149f9034f6",
"name": "Niacinamide/Yeast Polypeptide",
"other_names": null,
"rating": null
},
{
"id": "5461bbea-efdb-567a-9ce5-4c9fdc3b22c2",
"name": "Niacinamide (Skin-Conditioner)",
"other_names": null,
"rating": null
},
{
"id": "e24c8441-d4c6-5d35-aeb1-d215a506a899",
"name": "Methyl Niacinamide Chloride",
"other_names": null,
"rating": null
},
{
"id": "a87fb600-b56c-52dc-b13e-e86acb56ff4b",
"name": "Naturally Derived Niacinamide",
"other_names": null,
"rating": null
},
{
"id": "f53466cb-ee15-575e-b226-79c4ad90a6d9",
"name": "Biotin/Folic Acid/Cyanocobalamin/Niacinamide/Pantothenic Acid/Pyridoxine/Riboflavin/Thiamine/Yeast Polypeptides",
"other_names": null,
"rating": null
}
],
"pagination": {
"page": 1,
"has_more": false,
"total": 10
}
}/v1/ingredients/{id}Get an ingredient
An ingredient's full scientific record: normalized name, synonyms, functional classes, irritancy and comedogenicity ratings, and CAS, EC, IUPAC, and Ph. Eur. identifiers.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | uuid | Yes | Ingredient ID. |
curl https://api.thebeautyapi.com/v1/ingredients/a1526dea-37d1-5904-9106-be583378339b \
-H "x-api-key: $BEAUTY_API_KEY"const res = await fetch(
"https://api.thebeautyapi.com/v1/ingredients/a1526dea-37d1-5904-9106-be583378339b",
{ headers: { "x-api-key": process.env.BEAUTY_API_KEY } },
);
const data = await res.json();import os, requests
res = requests.get(
"https://api.thebeautyapi.com/v1/ingredients/a1526dea-37d1-5904-9106-be583378339b",
headers={"x-api-key": os.environ["BEAUTY_API_KEY"]},
)
data = res.json(){
"id": "a1526dea-37d1-5904-9106-be583378339b",
"name": "Niacinamide",
"rating": "direct actives",
"irritancy": null,
"comedogenicity": null,
"functions": [
"smoothing"
],
"cas_number": "98-92-0",
"ec_number": "202-713-4",
"ph_eur_name": "Nicotinamidum",
"iupac_name": "3-Pyridinecarboxamide",
"other_names": "vitamin B3, nicotinamide",
"category": null
}Notes:
- 01Recorded ingredient aliases resolve to the surviving record after deduplication. A retired ID without a replacement returns
410; an unknown ID returns404.
Endpoints
Reference
Service health, and how every endpoint behaves: paging, errors, plan limits, images, barcodes and versioning.
/healthHealth
Liveness check plus the size and build date of the catalogue currently being served. built_at (YYYY-MM-DD, UTC) is the freshness signal: the API is refreshed on its own cadence, independently of the downloadable dataset (see the changelog). Needs no API key, like the discovery document at the API root and the spec at /openapi.json.
No authentication required.
curl https://api.thebeautyapi.com/healthconst res = await fetch("https://api.thebeautyapi.com/health");
const data = await res.json();import requests
res = requests.get("https://api.thebeautyapi.com/health")
data = res.json(){
"status": "ok",
"products": 423062,
"ingredients": 26416,
"built_at": "2026-12-04"
}Pagination
List endpoints return 20 results per page. Pass page (1–51) and read the pagination object on the response; iterate while has_more is true. total is the number of matches across all pages, so a script can tell one exact hit from an ambiguous set before it reads the rows. A page beyond 51 is rejected with 400, so a total above 1,020 means narrow the query with filters instead of paging deeper.
"pagination": { "page": 2, "has_more": true, "total": 47 }Errors
Errors use conventional HTTP status codes with a uniform JSON body:
{
"statusCode": 404,
"error": "Not Found",
"message": "No product with id 00000000-0000-4000-8000-000000000000"
}Branch on statusCode; the message is written for a person reading a log and says what to change. A parameter the endpoint does not accept, for example, comes back with the accepted list and the endpoint to use instead:
{
"statusCode": 400,
"error": "Bad Request",
"message": "Unknown query parameters 'name', 'limit'. GET /v1/products accepts: category, brand, origin, fragrance_free, alcohol_free, paraben_free, sulfate_free, silicone_free, has_ingredient, excludes_ingredient, page. To find products by name, use GET /v1/products/search?q=<brand and product name>. Pages are fixed at 20 results; use page=2, page=3, … for more."
}| Status | Meaning |
|---|---|
| 400 | The request could never match anything: a query parameter the endpoint does not accept, a malformed ID or barcode, an unknown or retired ingredient ID in an ingredient filter, a page above 51, empty or over-long search text, or an invalid batch body. The message names the field and, for an unknown parameter, lists the ones the endpoint accepts. Fix the request; do not retry as-is. |
| 402 | Trial expired or payment required. Resolve billing on the dashboard before retrying. |
| 403 | Missing, invalid, or disabled API key, or a plan without barcode lookup calling the barcode endpoint. |
| 404 | Well-formed, but nothing matches: no product or ingredient with that ID, no product with that barcode, or a path the API does not serve. The message echoes the ID or barcode. |
| 410 | This ingredient ID was retired without a replacement. Search the ingredient dictionary for a current record. |
| 413 | Request body over 1 MB. Only the batch endpoint reads a body, and 50 UUIDs are under 3 KB, so a valid batch never reaches this. |
| 415 | Batch request sent without a Content-Type header, or with one the API cannot parse. Send Content-Type: application/json. |
| 429 | Trial request allowance exhausted (use Convert to paid on the dashboard), rate limit exceeded, or the monthly request ceiling reached. Paid plans have an abuse ceiling of several times the included calls (included calls never block; overage is billed). Gateway ceilings reset on the 1st (UTC); paid allowances reset with your billing month. The trial allowance never resets. Successful trial requests include X-Trial-Requests-Remaining. Back off for rate limits; use the dashboard for an exhausted trial. |
| 500 | Internal error on our side. Safe to retry. |
| 503 | Access verification is temporarily unavailable. Retry shortly with backoff. |
| 504 | The origin did not answer in time. Safe to retry with backoff. |
Rate limits & quotas
New accounts receive a seven-day trial with 100 requests total across all keys. At the cap, requests return 429 until you convert to paid or the trial ends. Trial requests never incur overage. Paid monthly fees are collected upfront; usage above the included allowance is billed at the end of your billing month at $0.02 per call. Paid batch requests meter per item, while each batch consumes one trial request. Paid allowances reset at the start of each billing month.
| Plan | Price | Included calls / month | Rate limit |
|---|---|---|---|
| Starter | $40/month | 10,000 | 10 req/sec, burst 20 |
| Starter + Barcode | $60/month | 10,000 | 10 req/sec, burst 20 |
| Pro | $200/month | 100,000 | 25 req/sec, burst 50 |
| Pro + Barcode | $300/month | 100,000 | 25 req/sec, burst 50 |
Requests above the rate limit return 429. No rate-limit headers are sent, so handle 429 with exponential backoff.
Products data
- Detail, batch and barcode responses include the fields below. Missing values are null.
- Search and filter results contain
id,brand,name,category,image_url,shade_name,size,pack_count,packaging,product_typeandsubcategory. Filtered listings also includecountries_of_sale. Missing metadata is null. Shade, size and packaging help distinguish similarly named records.
| Field | Type | Meaning |
|---|---|---|
| countries_of_sale | array | null | Countries where the product is evidenced as offered for sale, as ISO 3166-1 alpha-2 codes, such as US or CA. Null when unknown. This is separate from origin and does not describe shipping destinations. |
| product_type | string | null | Product structure: single for an individual item, set for a set or kit, or null when unknown. |
| subcategory | string | null | More specific product classification within its category. |
| size | string | null | Declared size with unit or pack wording. |
| packaging | string | null | Packaging description, such as a bottle, tube or jar. |
| pack_count | integer | null | Number of items in the pack, when known. |
| shade_name | string | null | Shade name supplied for the product. |
| benefits | string | null | Reported product benefits, when available. |
| directions | string | null | Directions for use. Text can contain line breaks. |
| warnings | string | null | Warnings supplied with the product. Text can contain line breaks. |
| ingredients_raw | string | null | Raw ingredient text from the product listing; see Ingredients data below. |
Ingredients data
Ingredient data comes in three structures:
ingredients: one ordered list.ingredient_sections: named sections, each with its own list.components: kit items, each with a list or sections.- Each product uses one structure; the other fields are omitted. Unavailable lists are null; other lists remain available.
Fields and values
position: starts at zero within each ingredient list, section list or component list.label_name: ingredient wording with spelling corrections; it can differ from the canonical name.concentration: declared percentage, or null.- Unmatched labels keep their position and wording, with null
idand dictionary fields. Matched ingredients may have an emptyfunctionsarray. - API ingredient IDs are UUIDs. Dataset
ingredient_idvalues are integers. contains_*: true, false or null (unknown). Sectionheadingand componentnamemay also be null.- Recognized headings are normalized to Ingredients, Active ingredients, Inactive ingredients, Medicinal ingredients, Non-medicinal ingredients or May contain. Other headings keep their wording.
Raw ingredient text
ingredients_raw: ingredient text from the product listing, also included alongside structured lists. Sections and components do not repeat it.- Original text and line breaks are preserved where available. The value is null when unavailable.
API response examples
Ingredient-related fields from illustrative API responses. Choose an example below.
{
"id": "00000000-0000-4000-8000-000000000001",
"ingredients_raw": "Aqua (Water), Glycerin",
"ingredients": [
{
"position": 0,
"label_name": "Aqua (Water)",
"concentration": null,
"id": "2ba7df6d-7d8a-5935-af3a-f0bb7f03fb53",
"name": "Water",
"rating": null,
"irritancy": null,
"comedogenicity": null,
"functions": [ "solvent"
],
"cas_number": "7732-18-5",
"ec_number": "231-791-2",
"ph_eur_name": "Aqua",
"iupac_name": null,
"other_names": "Aqua",
"category": null
},
{
"position": 1,
"label_name": "Glycerin",
"concentration": null,
"id": "59bfab3c-aaeb-5b95-8584-bfacb56e0c3a",
"name": "Glycerin",
"rating": "direct actives",
"irritancy": "0",
"comedogenicity": "0",
"functions": [
"denaturant",
"hair conditioning",
"humectant",
"oral care",
"perfuming",
"skin conditioning",
"skin protecting",
"solvent",
"viscosity controlling"
],
"cas_number": "56-81-5",
"ec_number": "200-289-5",
"ph_eur_name": "Glycerolum",
"iupac_name": "Glycerine ;Glycerol (Inn); Glycerol (Rifm); Glycerolum (Ep); Glycyl Alcohol; 1,2,3-Propanetriol; 1,2,3-Trihydroxypropane",
"other_names": "Glycerol",
"category": null
}
]
}{
"id": "00000000-0000-4000-8000-000000000001",
"ingredients_raw": "Active ingredients: Zinc Oxide\nInactive ingredients: Aqua (Water), Glycerin",
"ingredient_sections": [
{
"position": 0,
"heading": "Active ingredients",
"ingredients": [
{
"position": 0,
"label_name": "Zinc Oxide",
"concentration": null,
"id": "d6512677-49b1-5505-982d-6c9635b5f4a7",
"name": "Zinc Oxide", "rating": "supporting actives",
"irritancy": "0",
"comedogenicity": "1",
"functions": [
"bulking",
"cosmetic colorant",
"skin protecting",
"uv absorber",
"uv filter"
],
"cas_number": "1314-13-2",
"ec_number": "215-222-5",
"ph_eur_name": "Zinci Oxidum",
"iupac_name": "Zinc Oxide (Ci 77947)",
"other_names": null,
"category": null
}
]
},
{
"position": 1,
"heading": "Inactive ingredients",
"ingredients": [
{
"position": 0,
"label_name": "Aqua (Water)",
"concentration": null,
"id": "2ba7df6d-7d8a-5935-af3a-f0bb7f03fb53",
"name": "Water",
"rating": null,
"irritancy": null,
"comedogenicity": null,
"functions": [
"solvent"
],
"cas_number": "7732-18-5",
"ec_number": "231-791-2",
"ph_eur_name": "Aqua",
"iupac_name": null,
"other_names": "Aqua",
"category": null
},
{
"position": 1,
"label_name": "Glycerin",
"concentration": null,
"id": "59bfab3c-aaeb-5b95-8584-bfacb56e0c3a",
"name": "Glycerin",
"rating": "direct actives",
"irritancy": "0",
"comedogenicity": "0",
"functions": [
"denaturant",
"hair conditioning",
"humectant",
"oral care",
"perfuming",
"skin conditioning",
"skin protecting",
"solvent",
"viscosity controlling"
],
"cas_number": "56-81-5",
"ec_number": "200-289-5",
"ph_eur_name": "Glycerolum",
"iupac_name": "Glycerine ;Glycerol (Inn); Glycerol (Rifm); Glycerolum (Ep); Glycyl Alcohol; 1,2,3-Propanetriol; 1,2,3-Trihydroxypropane",
"other_names": "Glycerol",
"category": null
}
]
}
]
}{
"id": "00000000-0000-4000-8000-000000000001",
"ingredients_raw": "Cleanser: Aqua (Water), Glycerin\nSerum: Aqua (Water), Glycerin",
"components": [
{
"position": 0,
"name": "Cleanser",
"ingredients": [
{
"position": 0,
"label_name": "Aqua (Water)",
"concentration": null,
"id": "2ba7df6d-7d8a-5935-af3a-f0bb7f03fb53",
"name": "Water", "rating": null,
"irritancy": null,
"comedogenicity": null,
"functions": [
"solvent"
],
"cas_number": "7732-18-5",
"ec_number": "231-791-2",
"ph_eur_name": "Aqua",
"iupac_name": null,
"other_names": "Aqua",
"category": null
},
{
"position": 1,
"label_name": "Glycerin",
"concentration": null,
"id": "59bfab3c-aaeb-5b95-8584-bfacb56e0c3a",
"name": "Glycerin",
"rating": "direct actives",
"irritancy": "0",
"comedogenicity": "0",
"functions": [
"denaturant",
"hair conditioning",
"humectant",
"oral care",
"perfuming",
"skin conditioning",
"skin protecting",
"solvent",
"viscosity controlling"
],
"cas_number": "56-81-5",
"ec_number": "200-289-5",
"ph_eur_name": "Glycerolum",
"iupac_name": "Glycerine ;Glycerol (Inn); Glycerol (Rifm); Glycerolum (Ep); Glycyl Alcohol; 1,2,3-Propanetriol; 1,2,3-Trihydroxypropane",
"other_names": "Glycerol",
"category": null
}
]
},
{
"position": 1,
"name": "Serum",
"ingredient_sections": [
{
"position": 0,
"heading": "Ingredients",
"ingredients": [
{
"position": 0,
"label_name": "Aqua (Water)",
"concentration": null,
"id": "2ba7df6d-7d8a-5935-af3a-f0bb7f03fb53",
"name": "Water",
"rating": null,
"irritancy": null,
"comedogenicity": null,
"functions": [
"solvent"
],
"cas_number": "7732-18-5",
"ec_number": "231-791-2",
"ph_eur_name": "Aqua",
"iupac_name": null,
"other_names": "Aqua",
"category": null
},
{
"position": 1,
"label_name": "Glycerin",
"concentration": null,
"id": "59bfab3c-aaeb-5b95-8584-bfacb56e0c3a",
"name": "Glycerin",
"rating": "direct actives",
"irritancy": "0",
"comedogenicity": "0",
"functions": [
"denaturant",
"hair conditioning",
"humectant",
"oral care",
"perfuming",
"skin conditioning",
"skin protecting",
"solvent",
"viscosity controlling"
],
"cas_number": "56-81-5",
"ec_number": "200-289-5",
"ph_eur_name": "Glycerolum",
"iupac_name": "Glycerine ;Glycerol (Inn); Glycerol (Rifm); Glycerolum (Ep); Glycyl Alcohol; 1,2,3-Propanetriol; 1,2,3-Trihydroxypropane",
"other_names": "Glycerol",
"category": null
}
]
}
]
}
]
}{
"id": "00000000-0000-4000-8000-000000000001",
"ingredients_raw": "Aqua (Water), Glycerin",
"ingredients": null
}{
"id": "00000000-0000-4000-8000-000000000001",
"ingredients_raw": null,
"ingredients": null
}IDs and deduplication
- Deduplication aliases link older product and ingredient IDs to surviving records.
- Product lookups, including batch requests, return the surviving product and its ID. Ingredient lookups and filters also resolve aliases.
- Ingredient filters: any unknown or retired ID returns
400for the whole request. - Ingredient detail:
410for a retired ID without a replacement;404for an unknown ID.
Dataset files
- JSONL: the same ingredient structures, with numeric
ingredient_idreferences. - CSV and SQLite:
product_ingredientsholds flat lists;product_ingredient_groupsholds sections and components;product_group_ingredientsholds their entries. - Unmatched labels retain a row with a null ingredient reference.
- Nulls: SQL NULL in SQLite; blank cells in CSV. Quoted CSV fields preserve ingredient text line breaks.
Product images
Every product record carries an image_url pointing to standardized, white-background product photography served from images.thebeautyapi.com. 390,000 images are hosted for you. Display them directly in your product UI; there is nothing to download or re-host. A small number of products have no photograph, in which case image_url is null.
Barcodes
Barcodes are a lookup key, not a field. On barcode-enabled plans, GET /v1/products/barcode/{barcode} resolves a UPC-A / EAN-13 / GTIN-8/14 to its product and returns the standard product record. No response on any plan lists a product’s codes: detail, batch, search and filter payloads are identical with or without barcode access. Unit codes, multipack codes and sibling-variant codes (shade, scent or size of the same line) all resolve; a UPC-A and its zero-padded EAN-13 form are the same code. About 75% of the catalog carries at least one code today. If you need the codes themselves, they ship as a gtin14 list per product in the licensed dataset.
Versioning
The API uses the /v1 path. Clients should ignore additional response fields. Product responses support flat, sectioned and component ingredient structures, with nullable fields. Handle these alternatives as described in Ingredients data.
Data refreshes and API changes are recorded in the changelog.
Try it in Postman
The fastest way to see every endpoint working before you write code: import our ready-made Postman collection, paste your API key into one variable, and send each request above. The collection also includes a folder of requests that are meant to fail, so you can see exactly what a 400, 403 and 404 look like.
Ready to integrate?
Start a seven-day trial with 100 requests. Then plans from $40/month with 10,000 calls included.