# Cosdna — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search cosmetic products and ingredients to view detailed safety information, supplier data, and community reviews all in one place. Analyze ingredient lists to understand product composition and access the latest cosmetics forum discussions and user feedback.

**Category:** Healthcare | **Website:** [cosdna.com/](https://cosdna.com/) | **Docs:** [parse.bot/marketplace/c596db1d-8302-45d6-9a54-3eaab89afce9/cosdna-com-api](https://parse.bot/marketplace/c596db1d-8302-45d6-9a54-3eaab89afce9/cosdna-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-cosdna-com-api-c596db1d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### analyze_cosmetics

Analyze a list of ingredients submitted as text. Returns safety, acne, and irritant ratings for each recognized ingredient. Useful for checking a product's full ingredient list without needing a product_id.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ingredient_list` | string | Yes | Comma-separated list of cosmetic ingredients to analyze (e.g. 'Water, Glycerin, Niacinamide'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cosdna-com-api-c596db1d/analyze_cosmetics \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ingredient_list":"<string>"}'
```

### get_forum_posts

Get forum posts for a specific board. Returns post titles, links, and authors with pagination support.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `board_id` | string | No | Forum board ID (e.g. '13' for Skincare). |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cosdna-com-api-c596db1d/get_forum_posts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"board_id":"<string>","page":"<integer>"}'
```

### get_ingredient_details

Get details for a specific ingredient including synonyms, metadata (formula, molecular weight, CAS number), a description, and up to 10 related products containing the ingredient.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ingredient_id` | string | Yes | Ingredient ID from search_ingredients results (e.g. 'af81356377'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cosdna-com-api-c596db1d/get_ingredient_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ingredient_id":"<string>"}'
```

### get_latest_reviews

Get the latest product reviews displayed on the CosDNA homepage. Returns product names and links to their review sections.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cosdna-com-api-c596db1d/get_latest_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_details

Get full details for a product including its complete ingredient list with safety, acne, and irritant ratings. The product name is extracted from the page title. Each ingredient includes an ingredient_id for cross-referencing with get_ingredient_details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID from search_products results (e.g. '73c6694771'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cosdna-com-api-c596db1d/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### search_ingredients

Search for cosmetic ingredients by name. Supports single and multi-word queries. Returns ingredient IDs that can be used with get_ingredient_details for full information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword for ingredients (e.g. 'niacinamide', 'hyaluronic acid'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cosdna-com-api-c596db1d/search_ingredients \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### search_products

Full-text search over cosmetic products by name. Returns paginated results with product IDs, names, links, and thumbnails. Each product can be drilled into via get_product_details for its full ingredient list.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword for products (e.g. 'sunscreen', 'moisturizer'). |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cosdna-com-api-c596db1d/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>","sort":"<string>"}'
```

### search_suppliers

Search for ingredient suppliers. Returns supplier product listings with company names and descriptions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword for supplier products (e.g. 'Hyaluronic Acid'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cosdna-com-api-c596db1d/search_suppliers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
