State public health officials announced on Friday a new online database that shows which cosmetics sold in California contain certain harmful chemicals, offering the first state-run public resource to inform consumers about potentially hazardous products they use everyday on their skin and hair.

The long-awaited California State Cosmetics Program Product Database is part of a state law passed in 2005 that aims to expose products with potentially hazardous ingredients, and pressure manufacturers to reformulate makeup, soap, lotion and similar products with safer alternatives. The public can search the website by type of product, brand or ingredient, and will be shown a list of products made with chemicals that are known to cause cancer, reproductive harm or birth defects.

“It does not mean that the cosmetic product itself has been shown to cause cancer, but since most products are not extensively tested for safety, providing information on chemical components will allow consumers to make more informed choices,” said Dr. Ron Chapman, director of the state Department of Public Health.

As of November, the state had collected information from about 475 companies, which have disclosed the ingredients in roughly 30,000 products. The state is requiring only companies that sell in California and have more than $1 million per year in cosmetic sales to report the potentially harmful ingredients they use. The state is looking for about 900 chemicals that have been identified as harmful by Proposition 65 legislation and organizations such as the National Toxicology Program.

The database is part of the California Safe Cosmetics Act of 2005, legislation signed by then-Gov. Arnold Schwarzenegger. The law required the site to be up by Dec. 31, 2013, but a health department spokesman said it did not go live until Friday.

The law also gives the state some enforcement authority, such as requiring products are labeled with warnings.

“We are the one agency in the U.S. collecting this information on cosmetics,” Nerissa Wu, a state public health official who helped establish the program, told this newspaper in an interview last fall. “Our hope is that the market pressure that comes out of that … encourages manufacturers to reformulate.”

Advocates welcomed the database, but some worried that the state lacked the resources to enforce safer standards for cosmetics.

“This doesn’t ban anything. This doesn’t restrict anything,” said Gretchen Salter, senior program and policy manager at the San Francisco-based Breast Cancer Fund, an advocacy group that championed the 2005 legislation. “Ultimately our feeling is these products don’t belong in cosmetics in the first place.”