# Environmental Working Group — 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 for cosmetic ingredients and instantly access their safety ratings, health hazard scores, and potential concerns from EWG's trusted Skin Deep database. Get comprehensive ingredient information including alternative names, regulatory sources, and detailed safety assessments to make informed decisions about the products you use.

**Category:** Healthcare | **Website:** [www.ewg.org/](https://www.ewg.org/) | **Docs:** [parse.bot/marketplace/10eae15b-4111-471f-8013-9ef7e9e9b628/ewg-org-api](https://parse.bot/marketplace/10eae15b-4111-471f-8013-9ef7e9e9b628/ewg-org-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-ewg-org-api-10eae15b/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_ingredient

Retrieve detailed safety data for a specific cosmetic ingredient from EWG Skin Deep, including hazard score, description, common health concerns with severity levels, synonyms, detailed regulatory concerns with references, and EWG VERIFIED criteria.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ingredient_id` | string | Yes | Numeric ingredient ID from EWG Skin Deep (e.g. '702620' for Glycerin). Obtainable from search_ingredients results. |
| `ingredient_slug` | string | Yes | URL slug of the ingredient name in uppercase (e.g. 'GLYCERIN'). Obtainable from search_ingredients results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ewg-org-api-10eae15b/get_ingredient \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ingredient_id":"<string>","ingredient_slug":"<string>"}'
```

### search_ingredients

Search the EWG Skin Deep database for cosmetic ingredients by name. Returns a paginated list of matching ingredients with their hazard scores and data availability ratings. Results are auto-iterated; use limit to cap total items fetched.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based). |
| `search` | string | No | Search query for ingredient name. Use '*' to list all ingredients. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ewg-org-api-10eae15b/search_ingredients \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","search":"<string>"}'
```
