Get an API key
Visit blackhairapi.com/pricing and subscribe to the plan that fits your use case. Once your payment is confirmed, your API key is emailed to you — check your inbox and spam folder.Your key looks like this:Keys always begin with the
bha_ prefix followed by a URL-safe random string. Store your key in an environment variable or a secrets manager — never hard-code it in your source files.Make your first request
Call A successful response returns
GET /v1/products/ to retrieve the first page of the product catalog. Pass your API key in the X-API-Key header on every request.200 OK. If you see 401 Unauthorized, double-check that the X-API-Key header is present and that your key begins with bha_.Parse the response
The Each product includes a nested
/v1/products/ endpoint returns a data array of product objects and a meta block with pagination details. Here is a representative response:brand object (with an is_black_owned flag), a hair_profile describing the curl types and porosity levels the product is suited for, and a price_range object with min and max values in USD.To retrieve a specific product and its full ingredient breakdown, call GET /v1/products/{id}?include=ingredients:Try the ingredient lookup
The The response includes the ingredient’s function (e.g.
/v1/ingredients/lookup endpoint lets you look up any ingredient by name and get back its classification, safety flags, and compatibility notes. Try it with a common humectant:humectant), whether it is a sulphate, silicone, or paraben, and its moisture and protein contribution scores — the same data used to power the product-level ingredient flags.Every plan has both a per-minute and a monthly request limit. The Starter plan allows 5 requests per minute and 100 requests per month. If you exceed either limit, the API returns
429 Too Many Requests. See Plans & Limits for a full breakdown of all tier allowances and upgrade options.