# California Cosmetics Lookup (`primeselectai/california-cosmetics-chemical-disclosure-lookup`) Actor

Turn California Safe Cosmetics disclosures into clean, searchable records for product compliance, supplier audits, chemical monitoring, UPC matching, and catalog updates. Extract product name, brand, company, upc and category as clean, structured dataset records.

- **URL**: https://apify.com/primeselectai/california-cosmetics-chemical-disclosure-lookup.md
- **Developed by:** [Simon Jessen](https://apify.com/primeselectai) (community)
- **Categories:** Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.04 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## California Cosmetics Chemical Disclosure Lookup

Start with a product, brand, UPC, company, category, or chemical query and receive structured California disclosure records. Results include normalized identifiers, reported chemicals, CAS numbers, change dates, quality flags, snapshot differences, and official CC BY attribution.

### Outcome

Search California's current public cosmetics disclosure records by product, brand, company, UPC, ingredient, or category and receive normalized, deduplicated, monitoring-ready records with official source attribution.

### Use cases

- Use the Actor when you need search California's current public cosmetics disclosure records by product, brand, company, UPC, ingredient, or category and receive normalized, deduplicated, monitoring-ready records with official source attribution.
- Build workflows around transform the official dataset into a compliance and catalog workflow with normalized identifiers, UPC and CAS matching, deduplication, chemical grouping, reformulation and discontinuation signals, snapshot comparison, stable record IDs, and explicit reporting-limitations flags.
- Designed for Cosmetics brands, regulatory teams, retailers, ingredient-compliance platforms, consumer-safety researchers, and ecommerce catalog managers.
- Schedule repeat runs: Compliance and catalog teams rerun searches weekly or monthly to detect newly reported products, chemical changes, reformulations, discontinuations, and supplier mismatches.
- Feed normalized dataset records into APIs, spreadsheets, databases, automations, or AI/agent workflows.

### Quick start

1. Open the Actor input form.
2. Set the filters or query relevant to your workflow.
3. Start with a small `maxResults` value.
4. Run the Actor and inspect the default dataset before scheduling larger or recurring jobs.

Example input:

```json
{
  "query": "lipstick",
  "searchBy": "product_name",
  "maxResults": 10,
  "includeIngredients": true
}
```

### Inputs

- **query** (string, required) — Product name, brand, company, category, UPC, CAS number, or reported chemical term.
- **searchBy** (string, optional) — Preferred search field: product\_name, brand, company, category, upc, cas\_number, ingredient, or all. The public Datastore full-text query is used for retrieval.
- **maxResults** (integer, optional) — Maximum number of source records to retrieve per request, from 1 to 5000.
- **includeIngredients** (boolean, optional) — Include normalized reported chemical names and CAS numbers when available.
- **previousSnapshot** (array, optional) — Optional prior normalized records used for snapshot comparison and change classification.

### Output example

The example below is taken from the latest validated local live-source sample when available; otherwise it is derived from the bundled dataset schema.

```json
{
  "id": "30521",
  "product_name": "Lipstick",
  "brand": "L�piz Labial / Lipstick- Piensa en M� U649\tL�piz Labial / Lipstick- Cielo Rojo",
  "company": "SERYSI USA INC",
  "upc": null,
  "category": null,
  "reported_chemicals": "Titanium dioxide",
  "chemical_count": 1,
  "report_date": null,
  "discontinuation_date": null,
  "reformulation_date": null,
  "change_type": "unavailable",
  "data_quality_flags": [],
  "source_url": "https://data.ca.gov/api/action/datastore_search?resource_id=630f9115-0286-4dd6-9e4e-04d406555465",
  "license_notice": "Source: California Department of Public Health, California Safe Cosmetics Program, Chemicals in Cosmetics dataset. Licensed under CC BY. Modifications and normalization applied; no government endorsement is implied. Reported disclosures are not a complete ingredient list or safety determination."
}
```

### Pricing

Store pricing is configured in Apify. The intended primary paid unit is **normalized cosmetics disclosure record**. Start with a small result limit while validating your workflow, then scale only when the output and economics fit your use case. The README never hard-codes a price that could drift from the live Store configuration.

### Source and limitations

- Source: California Safe Cosmetics Program — Chemicals in Cosmetics.
- Licence/terms: Creative Commons Attribution (CC BY).
- Reuse condition: The official catalog identifies the dataset as public and licensed under Creative Commons Attribution. Paid transformation and standalone redistribution of the dataset-derived records are permitted subject to CC BY attribution and preservation of license notices. Identify the California Department of Public Health and California Safe Cosmetics Program as the source, indicate modifications, and do not imply government endorsement. Do not market reported disclosures as a complete ingredient list, safety determination, toxicity assessment, legal opinion, or proof that a product is safe or unsafe. Minimize incidental company contact or personal information if encountered. Images, logos, trademarks, and long descriptive text are not required for this Actor and should not be redistributed.
- Automation condition: Use bounded CKAN Datastore pagination, filters or SQL where supported, caching, exponential backoff for transient 429/5xx responses, schema validation, and low request concurrency. Perform a health check against the current data.ca.gov endpoint before release. Do not automate the authenticated reporting portal.
- The source contains reported disclosures, not a complete cosmetics catalog or complete ingredient list; non-reporting, exemptions, incomplete submissions, and stale records can create false negatives.
- Reported chemical presence is not a safety, toxicity, medical, legal, or regulatory-compliance determination.
- UPC coverage and formatting may be incomplete, so product-name, brand, company, and CAS matching should remain available.
- CC BY attribution and modification notices must be preserved in paid outputs and downstream documentation.
- Government and program names, seals, logos, and trademarks must not imply California or CDPH endorsement.

This Actor does not bypass authentication, rate limits, robots/API policies, licensing conditions, or upstream access controls. Missing upstream values are not invented.

### FAQ

**Does this use the approved source contract?**\
Yes. Runtime requests are restricted to the source contract validated by Market Hunter before build.

**Can I schedule repeat runs?**\
Yes, when the source permits automated access. Use conservative schedules and result limits that respect upstream conditions.

**Why can some fields be empty or null?**\
The upstream source may omit fields for particular records. The Actor preserves missing values rather than fabricating data.

### Troubleshooting

- If a narrow query returns no rows, loosen filters and retry with a small result limit.
- If the upstream source returns a rate-limit or temporary server error, retry later instead of increasing request pressure.
- If authentication or source identity is required, verify the protected credential/identity configured for the Actor.
- If the upstream response schema changes, report the failed run so the deterministic mapping can be updated.

### Related Actors

- California Cosmetics Disclosure Change Monitor
- Cosmetic UPC Supplier Reconciliation
- Cosmetic CAS Number Normalizer
- Beauty Product Compliance Evidence Extractor

> Store publication remains an explicit manual action. This product is not affiliated with or endorsed by the upstream source unless the Store listing explicitly states otherwise.

# Actor input Schema

## `query` (type: `string`):

Product name, brand, company, category, UPC, CAS number, or reported chemical term.

## `searchBy` (type: `string`):

Preferred search field: product\_name, brand, company, category, upc, cas\_number, ingredient, or all. The public Datastore full-text query is used for retrieval.

## `maxResults` (type: `integer`):

Maximum number of source records to retrieve per request, from 1 to 5000.

## `includeIngredients` (type: `boolean`):

Include normalized reported chemical names and CAS numbers when available.

## `previousSnapshot` (type: `array`):

Optional prior normalized records used for snapshot comparison and change classification.

## Actor input object example

```json
{
  "query": "lipstick",
  "searchBy": "product_name",
  "maxResults": 10,
  "includeIngredients": true,
  "previousSnapshot": []
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `runMeta` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "lipstick",
    "searchBy": "product_name",
    "maxResults": 10,
    "includeIngredients": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("primeselectai/california-cosmetics-chemical-disclosure-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "lipstick",
    "searchBy": "product_name",
    "maxResults": 10,
    "includeIngredients": True,
}

# Run the Actor and wait for it to finish
run = client.actor("primeselectai/california-cosmetics-chemical-disclosure-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "lipstick",
  "searchBy": "product_name",
  "maxResults": 10,
  "includeIngredients": true
}' |
apify call primeselectai/california-cosmetics-chemical-disclosure-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,primeselectai/california-cosmetics-chemical-disclosure-lookup"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Tut1kmgcHa2oNP8fp/builds/P4HADa3HBOu8trPaN/openapi.json
