At least three Americans, all of them of Iranian heritage, are in jail in Iran including Jason Rezaian, a correspondent for The Washington Post who was arrested in July 2014 and accused of spying.
The two other Americans are Amir Hekmati, a former US Marine who was charged with spying, and Saeed Abedini, a convert to Christianity who gathered a Bible study group.
Much of Iran`s judiciary is known for its closeness to hardliners, who are eager to scuttle the moderate Rouhani`s efforts to reconcile with Western powers.
"Nothing would make me happier" than movements to release prisoners, Rouhani said.
The United States has regularly demanded the unconditional release of the three prisoners.
For its part, Iran has sought the freedom of 19 of its citizens who are jailed in the United States in connection with Washington`s sanctions against the Islamic republic`s nuclear program.
Under Rouhani, Iran has reached an agreement with the United States and five other powers to end suspicious nuclear activity in return for sanctions relief.
While tensions have eased, Iran and the United States have not had diplomatic relations since 1980, a year after the Islamic revolution toppled the Western-oriented shah.
Another American, former FBI agent Robert Levinson, disappeared in Iran in 2007 but his whereabouts are unclear.
More about: