The committee later approved the overall bill on a 13-5 vote.
Sen. Chuck Schumer, a Democrat and a chief proponent of the media shield legislation, worked with two other Democrats, Sens. Dianne Feinstein and Dick Durbin, as well as representatives from news organizations, on the compromise.
The bill would protect reporters and news media organizations from being required to reveal the identities of confidential sources, but it does not grant an absolute privilege for journalists.
Sen. Jeff Sessions, a Republican, complained that the definition of a journalist was too broad. Pushing back, Feinstein said the intent was to set up a test to determine a bona fide journalist.
"I think journalism has a certain tradecraft. It's a profession. I recognize that everyone can think they're a journalist," Feinstein said.
The overall measure would incorporate many of the changes proposed by Attorney General Eric Holder in July. Criticism of the collection of the material without any notice to the news organizations prompted President Barack Obama to order Holder to review the department's policy.
Holder's revised guidelines called for the government to give advance notice to the news media about subpoena requests for reporters' phone records unless the attorney general determines such notice would pose a clear and substantial threat to the investigation. Search warrants for a reporter's email would only apply when the individual is the focus of a criminal investigation for conduct not connected to ordinary newsgathering.
The bill makes clear that before the government asks a news organization to divulge sources, it first must go to a judge, who would supervise any subpoenas or court orders for information. Such orders would be limited, if possible, "in purpose, subject matter and period of time covered so as to avoid compelling disclosure of peripheral, nonessential or speculative information."
Holder's revised guidelines do not call for a judge to be involved before the government asks a news organization to divulge sources. However, the guidelines call for a new standing News Media Review Committee to advise the attorney general on such requests.
Reporters must be notified within 45 days of a request, a period that could be extended another 45 days but no more.
In the AP story that triggered one of the leak probes, the news organization reported that U.S. intelligence had learned that al-Qaida's Yemen branch hoped to launch a spectacular attack using a new, nearly undetectable bomb aboard a U.S.-bound airliner around the anniversary of Osama bin Laden's death.
In the Fox News story, reporter James Rosen reported that U.S. intelligence officials had warned Obama and senior U.S. officials that North Korea would respond to a U.N. Security Council resolution condemning nuclear tests with another nuclear test.