WASHINGTON (AP) — Senate Republicans are criticizing federal regulators' efforts to track the credit card, mortgage and spending habits of millions of consumers by collecting anonymous data about them.

Sen. Mike Crapo of Idaho says the newly established Consumer Financial Protection Bureau should be watching out for consumers — not watching them. Agency head Richard Cordray told the Senate Banking Committee on Tuesday that his bureau is using the data to understand the financial marketplace and to help consumers — not violate their privacy.

Republicans have questioned the legitimacy of Cordray's recess appointment by President Barack Obama. The new financial protection bureau was created in the wake of the 2008-2009 financial crisis. Republicans generally opposed the agency's creation and contend it has too much power.