A Republican US senator has given a marathon 21-hour speech in Congress to protest against funding for president Barack Obama's signature healthcare law.

Texan senator Ted Cruz took to the Senate floor in a bid to unite his party in opposition to a spending bill which will continue to fund the law, known colloquially as 'Obamacare'.

Republicans have threatened to vote against key budget proposals and shut down the federal government unless the law is repealed.

The first-term senator held the Senate floor well through the night, even including a reading from a Dr Seuss children's book around his daughters' bedtime.

Mr Cruz is one of the key players behind the Republicans' big gamble to try and force the government to drop the healthcare law.

"It is now abundantly clear that this train wreck, this nightmare is hurting Americans all over this country," he told a nearly empty Senate chamber.

"Why won't they listen to me?" was his plaintive query, asking of the refusal by Washington's "ruling class" to hear his complaints and those of their constituents.

Over the hours, Mr Cruz answered questions by at least 10 other senators, including fellow conservatives Rand Paul, Marco Rubio and Mike Lee, who back his effort to stall the legislation even at the risk of forcing a government shutdown.

Many Republicans have expressed opposition to the strategy, warning it could backfire and not leave the House of Representatives enough time to consider the Senate measure and either pass it or send back a counter-offer.

But Mr Cruz, a conservative Republican with Tea Party sympathies, pressed on with his talkathon.

"While the Senate slept, men and women of America didn't get a respite from the nightmare of what is causing them to lose their jobs and never to get hired," he said.

When Mr Cruz began at 2:41pm Tuesday (local time), he said he intended to speak "until I am no longer able to stand."

Americans 'don't like green eggs and ham ... or Obamacare either'

His resolve carried him into the night, when he gave a dramatic reading of the classic children's book Green Eggs and Ham by Dr Seuss, as his young daughters back home in Texas were preparing for bed.

Americans, he said, "did not like green eggs and ham, and they did not like Obamacare either. They did not like Obamacare in a box, with a fox, in a house, with a mouse."

The longest Senate speech on record was a filibuster by Senator Strom Thurmond in 1957, who spoke for 24 hours and 18 minutes against the Civil Rights Act.

Even though Mr Cruz called his speech a filibuster, technically it is not considered one, because his effort will not delay legislation.

Americans did not like green eggs and ham, and they did not like Obamacare either. They did not like Obamacare in a box, with a fox, in a house, with a mouse.