The reality TV star has made it very real.

Republican Donald Trump, a divisive outsider who overcame even his own party's distrust, took to a New York stage in the early hours of Wednesday to claim the presidency of the United States. His acceptance speech, delivered after he said he had spoken with Democrat rival Hillary Clinton, capped a race that at times seemed out of control and until minutes earlier had been expected to continue well into Wednesday.

"This was tough, this was tough," Trump told the crowd as he extended an olive branch to Clinton and the Democrats. "This political stuff is nasty and it's tough."

He also struck a conciliatory note.

"For those who chose not to support me in the past, of which there are a few people, I'm reaching out to you for your guidance and your help so we can reach out and unify our great country," he said.

Trump's acceptance, which came as the final votes were still being counted, followed a chief adviser to Clinton telling her supporters to go home early Wednesday.

Clinton finally gave her concession speech (with accompanying tweets) late Wednesday morning, saying that she hopes he will be successful and offering "to work with him on behalf of the country."

Clinton's comments begin the conclusion of an extraordinary presidential election that has played out on Twitter, Facebook and WikiLeaks. Polls widened and tightened based on leaks about the email server Clinton used when she was secretary of state.

Almost no one got it right.

Early counts on Tuesday suggested the election for the 45th president would be a blowout for Clinton. Now Trump appears to have taken many of the key swing states in a race that will go down as among the narrowest contests ever. The only aspect everyone agrees on is that it was a nasty campaign.

Now playing: Watch this: Clinton and Obama call for unity after Trump victory

Key swing states Ohio and Florida chose Trump, the billionaire real estate developer and star of the long-running reality TV show "The Apprentice," prompting the word "panic" to take off among Clinton supporters on Twitter. Clinton picked up Colorado. A handful of other battleground states remained in play.

Spredfast, a social media analytics firm, followed how people feel about the candidates throughout the day in seven swing states -- New Hampshire, Pennsylvania, North Carolina, Florida, Ohio, Michigan and Colorado. The experiment: Gauge how closely tweets tracked votes in the race to become the 45th president of the US.

The Austin, Texas-based company uses Twitter posts in each state that contain positive mentions of a candidate to quantify trends. Spredfast ignores accounts with fewer than 200 followers -- they could be bots! -- and those of verified political figures, who have obvious agendas.

Breaking down the tweets

Can social media at some point really tell us how an election may pan out? Spredfast isn't the only one trying to figure that out. The California Institute of Technology unveiled a website Monday called Tweeting the Election that breaks down tweets by geography and the political background of the person tweeting. Caltech is looking at people's takes on topics like Election Day voting, absentee ballots and voting places.

It's an understatement to say social media helped set the tone of this historic election. Trump practically ran his campaign on Twitter, forcing rivals to respond to his 140-character attacks (that is, until his aides reportedly pulled the plug this week on unsupervised tweeting).

Now playing: Watch this: Digital ways to follow Election Day, or just chill with...

Clinton also used social media to her advantage, launching a Spanish-language Twitter feed and website. And at July's Democratic National Convention, Clinton called out Trump's reliance on social media, delivering a blistering attack that went viral in its own right. "A man you can bait with a tweet," she said, "is not a man we can trust with nuclear weapons."

On Tuesday, it was voters who went to Twitter, expressing their support for one candidate or the other. The social network said more than 75 million tweets about the election were sent over the course of Election Day through early Wednesday. That compares with 31 million for the entirety of Election Day in 2012.

Trump updated his Twitter bio and, naturally, sent a first post-election tweet early Wednesday to his 13.7 million followers as the soon-to-be commander-in-chief:

Meanwhile, Clinton's final tweet Tuesday, several hours before conceding to Trump, has become her second-most retweeted ever:

Spredfast said late Tuesday that for the first time in the election, Twitter was at a loss for words. Mentions of "no words" had soared.

In New York, Trump supporters lined up inside New York Hilton Midtown for the candidate's election night event. An air of optimism spread through the crowd.

While waiting in line, Marty Heiser, owner of a painting contractor company, said he'd found like-minded Trump backers by sharing his thoughts on Facebook.

Enlarge Image Ben Fox Rubin/CNET

"I've been mildly obsessed with this campaign on Facebook," the Connecticut resident said. "I'm a 55-year-old man, so I've been late to come to social media."

Meanwhile, outside Clinton's campaign party at the Javits Center in Manhattan, Hamza Saleem and two female friends were trying to get inside. When asked how they've been following the race, they all replied "Snapchat," and laughed.

"We got together because we wanted to be together for this moment," Saleem said. "If it doesn't go our way, we'll cry together."

Below is what Spredfast saw on Election Day.

First published November 8 at 7:36 a.m. PT.

Latest update November 9 at 9:23 a.m. PT: Added comments from Clinton's concession speech.

CNET writers Ben Fox Rubin and Joan E. Solsman contributed to this report.

FLORIDA: The Sunshine State delivered one of the most nail-biting races as the candidates were neck and neck. CBS News projected Florida for Trump at 8:36 p.m. PT.

Before Trump won Florida, the word "panic' began taking off on social media as Clinton supporters became concerned.

NEW HAMPSHIRE: Strong feelings for and against each candidate produced wild swings given the Granite State's relatively small population.

PENNSYLVANIA: After a period of being sharply negative, feelings on social media found a groove as voters waved the flag for their candidate rather than tearing down the opponent. As of 11:30 p.m. PT, CBS News hadn't called the commonwealth, though the AP called it for Trump.

NORTH CAROLINA: Clinton saw a sharp surge in positive tweets, but it wasn't enough to overcome Trump's support. CBS News projected Trump would win the state at 8:04 p.m. PT.

OHIO: Enthusiasm for Clinton surged, but not enough. CBS News called the Buckeye State for Trump at 7:31 p.m. PT.

Spredfast said late Tuesday that "as signs in the [Democratic] blue wall began to show" trouble for Clinton, Canada's immigration website crashed as Americans rushed to consider a relocation to the northern neighbor of the US.

MICHIGAN: Positive tweets for Clinton surged, while Trump slumped.

COLORADO: Enthusiasm for Trump slipped, while Clinton picked up steam. At 7:42 p.m. PT, CBS News called Colorado and its nine electoral votes for Clinton.