WASHINGTON (AP) - President Barack Obama declared Friday that America is "going to have to make some choices" balancing privacy and security, launching a vigorous defense of formerly secret programs that sweep up an estimated 3 billion phone calls a day and amass Internet data from U.S. providers in an attempt to thwart terror attacks. He warned that it will be harder to detect threats against the U.S. now that the two top-secret tools to target terrorists have been so thoroughly publicized. At turns defensive and defiant, Obama stood by the spy programs revealed this week. The National Security Agency has been collecting the phone records of hundreds of millions of Americans each day, creating a database through which it can learn whether terror suspects have been in contact with people in the U.S. It also was disclosed this week that the NSA has been gathering all Internet usage - audio, video, photographs, emails and searches - from nine major U.S. Internet providers, including Microsoft and Google, in hopes of detecting suspicious behavior that begins overseas. "Nobody is listening to your telephone calls," Obama assured the nation after two days of reports that many found unsettling. What the government is doing, he said, is digesting phone numbers and the durations of calls, seeking links that might "identify potential leads with respect to folks who might engage in terrorism." If there's a hit, he said, "if the intelligence community then actually wants to listen to a phone call, they've got to go back to a federal judge, just like they would in a criminal investigation." While Obama said the aim of the programs is to make America safe, he offered no specifics about how the surveillance programs have done this. House Intelligence Committee Chairman Mike Rogers, R-Mich., on Thursday said the phone records sweeps had thwarted a domestic terror attack, but he also didn't offer specifics. Obama asserted his administration had tightened the phone records collection program since it started in the George W. Bush administration and is auditing the programs to ensure that measures to protect Americans' privacy are heeded - part of what he called efforts to resist a mindset of "you know, 'Trust me, we're doing the right thing. We know who the bad guys are.' But again, he provided no details on how the program was tightened or what the audit is looking at. The furor this week has divided Congress, and led civil liberties advocates and some constitutional scholars to accuse Obama of crossing a line in the name of rooting out terror threats. Obama, himself a constitutional lawyer, strove to calm Americans' fears - but also remind them that Congress and the courts had signed off on the surveillance. "I think the American people understand that there are some trade-offs involved," Obama said when questioned by reporters at a health care event in San Jose, Calif. "It's important to recognize that you can't have 100 percent security and also then have 100 percent privacy and zero inconvenience," he said. We're going to have to make some choices as a society. And what I can say is that in evaluating these programs, they make a difference in our capacity to anticipate and prevent possible terrorist activity. Obama said U.S. intelligence officials are looking at phone numbers and lengths of calls - not at people's names - and not listening in. The two classified surveillance programs were revealed this week in newspaper reports that showed, for the first time, how deeply the National Security Agency dives into telephone and Internet data to look for security threats. The new details were first reported by The Guardian and The Washington Post, and prompted Director of National Intelligence James Clapper to take the unusual and reluctant step of acknowledging the programs' existence. Obama echoed intelligence experts - both inside and outside the government - who predicted that potential attackers will find other, secretive ways to communicate now that they know that their phone and Internet records may be targeted. "The bad folks' antennas go back up and they become more cautious for a period of time," said former Rep. Pete Hoekstra, a Republican who sat on the House Intelligence Committee for a decade, including as chairman for nearly three years. He said he approved the phone surveillance program but did not know about the online spying. "So right now, with these organizations and individuals we're trying to track, we'll see a drop-off in the ability of these tools to get beneficial or meaningful intelligence," Hoekstra said Friday. People will start putting in protocols to protect themselves from intelligence gathering. It will have a negative effect. But we'll just keep coming up with more sophisticated ways to dig into these data. It becomes a techies game, and we will try to come up with new tools to cut through the clutter. For example, extremists could start using online providers that do not have servers based in the U.S. and therefore do not have to comply with American court orders. In the immediate years after the Sept. 11, 2001, attacks, the government began collecting data from U.S. telephone companies, looking at whether overseas terror suspects were calling phone numbers in the U.S. The program does not allow the government to listen in on calls, but it can track where a call was placed and how long it lasted. If intelligence officials single out phone numbers that they want to target for eavesdropping, they must return to court to get approval. In 2006, after the telephone surveillance was first revealed and amid a public outcry, a secret court was tasked with approving all of the government requests for the records - amounting to as many as 3 billion phone calls daily. But until this week, it was not widely known how many phone records were noted, or how often. The NSA seizure of website and Internet provider records was even more secretive, and began only in the past few years. Clapper said those records, too, are released only with secret court orders, and monitors look only for documents that appear to have come from overseas. The data are not to be used to target U.S. citizens, and the government must try to minimize any information that was mistakenly taken from Americans. It was not immediately clear how intelligence analysts weed out Americans' online documents from those sent by a citizen of another country. And it's unknown if Internet communications from citizens of the closest U.S. allies - like Britain, Canada, Australia and New Zealand - are examined. Several of the Internet companies, including Apple and Facebook, denied in carefully worded statements that they provided the government direct access to their servers, and said they would not have done so without a court order. But their involvement remained unclear Friday, as the surveillance program was authorized by a court and likely would have set up a designated route to transfer data so that direct access to the servers would have been unnecessary. In a statement, Facebook founder and CEO Mark Zuckerberg encouraged all governments to be more transparent about programs to keep the public safe. "It's the only way to protect everyone's civil liberties and create the safe and free society we all want over the long term," Zuckerberg posted on his Facebook page. The new details of the broad surveillance have brought criticism from civil liberties and privacy advocates, as well as re-igniting a long-simmering debate in Congress over government power in security issues. "Tell our nation's leaders to stop spying on calls, email," the Council on American-Islamic Relations wrote to its followers on Friday. The American Civil Liberties Union demanded a congressional investigation. In his comments Friday, Obama said that "every member of Congress" had been briefed on the spy programs. However, only members of the House and Senate Intelligence committees and the leadership, who have high security clearances, are routinely briefed and oversee the surveillance. Democratic Rep. Raul Grijalva of Arizona called the programs "a serious breach of faith between the federal government and the American people." He demanded the Obama administration limit the surveillance. Republican Sen. Rand Paul of Kentucky said the telephone data collection is "an astounding assault on the Constitution," and he introduced legislation to require a warrant before any government agency could search Americans' phone records. But a number of other lawmakers, including Democrats and Republicans who sit on the Intelligence committees, vociferously defended the programs as necessary safeguards against terror threats that the public never knows about. Obama said he would be happy to join a new debate in Congress over whether the surveillance programs are appropriate, noting that lawmakers continually authorize the measures that some now are criticizing. But he, too, warned that making the programs public now risks security: "It's very hard for us to be as effective in protecting the American people," Obama said. Superville reported from San Jose, Calif. Follow Lara Jakes and Darlene Superville on Twitter at: https://twitter.com/larajakesAP and https://twitter.com/dsupervilleap