How I Met Your Mother had an ensemble cast full of comedic megastars like Alyson Hannigan of American Pie fame and Bob Saget from Full House, as well as rising talent like Marvel's Cobie Smulders and romcom star Jason Segel. But this sitcom about best friends and finding love also had so many celebrity guest stars that it's hard to keep track.

RELATED: Cameos No One Saw Coming On 'How I Met Your Mother'

From the cast's own friends and partners to three notable game show hosts to two karate kids, HIMYM became a show that several major names in Hollywood wanted to be a part of.

Bob Barker as Himself

Bob Barker on How I Met Your Mother

A running storyline during the early seasons of How I Met Your Mother was the mystery behind who Barney's father was. For Barney's whole life, he believed his biological father was Bob Barker after asking his mother who his father was, she simply pointed at the TV showing The Price Is Right and said, "That guy."

RELATED: 'The Price Is Right’ to Celebrate 50th Anniversary With 50-Stop Come On Down Tour

In a Season 2 episode, Barney becomes a contestant on The Price Is Right and finally has the chance to confront the game show host about his fatherhood.

Kim Kardashian as Herself

Kim Kardashian on How I met Your Mother

Kim Kardashian spent the majority of the early 2000s on reality TV, including starring in hundreds of episodes of Keeping Up with the Kardashians and competing in Season 7 of Dancing With The Stars.

The star also made a cameo on Season 4 of How I Met Your Mother as herself. Kardashian poses on the cover of a magazine Marshall is reading and comes to life before his eyes to give him a much-needed pep talk.

Wayne Brady as James Stinson

Kim Kardashian on How I met Your Mother

While he's been best known for his improvised comedy on Whose Line Is It Anyway?, Wayne Brady is no stranger to the acting world, and had a recurring role on How I Met Your Mother.

From Seasons 2 through 9, Brady appeared in 14 episodes as James Stinson, the older brother of Barney who enjoys wearing suits like his brother, but settles down with a spouse and a child, to his brother's dismay.

David Burtka as Scooter

David Burtka on How I Met Your Mother

Scooter was Lily's high school friend-turned-boyfriend who continued trying to win her back long after their breakup before college, even getting a job at the school cafeteria where Lily worked as a teacher.

Scooter was played by actor and chef David Burtka, who is the real-life husband of Barney's portrayer Neil Patrick Harris. Burtka went on to guest star in seven episodes of his husband's sitcom.

Taran Killam as Gary Blauman

Taran Killam on How I Met Your Mother

Saturday Night Live alum Taran Killam guest-starred in six episodes of How I Met Your Mother as Gary Blauman, a Goliath National Bank employee who worked closely with Marshall and Barney.

In real life, Killam is married to Robin's portrayer Cobie Smulders, but only shared a few scenes with his then-girlfriend on HIMYM.

Dave Coulier as Himself

Dave Coulier on How I Met Your Mother

From Grandfathered to The Even Stevens Movie, this Full House alum is known for his comedic guest appearances, and in 2013, the comedian popped up on Season 8 of How I Met Your Mother.

RELATED: Celebs You Forgot Guest-Starred On 'Full House'

Dave Coulier made a cameo as himself for one episode, reuniting with his fellow Full House cast member Bob Saget, who provided the voice for Future Ted's narrations. The episode even nodded to the sitcom that came before it, when Coulier responds to a question with Joey Gladstone's signature catchphrase "Cut it out," to which Future Ted comments, "I always liked that joke."

Bryan Cranston as Hammond Druthers

Bryan Cranston on How I Met Your Mother

Sometime between raising five boys on Malcolm in the Middle and becoming a Primetime Emmy Award winner for his work on Breaking Bad, Bryan Cranston was bossing around Ted Mosby at his architecture firm on How I Met Your Mother.

Cranston appeared in three episodes as Hammond Druthers, who was known as the boss everyone in the office hated until a strange twist of fate turned Ted into Druthers' boss, resulting in Druthers' firing from the firm.

Regis Philbin as Himself

Regis Philbin on How I Met Your Mother

The Live with Regis and Kelly and Who Wants To Be A Millionaire star was known for making guest appearances on TV shows, and in 2008, notable host Regis Philbin guest-starred on a Season 4 episode of How I Met Your Mother.

In an episode centered around Marshall's journey to finding the best burger in New York, he and his friends stumble upon Philbin along the way, who is coincidentally on the same journey. Despite never finding that best burger, Philbin joins the group of friends for dinner consisting of lesser burgers.

Alex Trebek as Himself

Alex Trebek on How I Met Your Mother

The late, great Jeopardy host Alex Trebek made several television guest appearances throughout his career, including two cameos on How I Met Your Mother.

Trebek played himself in Season 6 when Robin is offered a job as the "coin flip girl" on the fictional game show "Million Dollar Heads or Tails." Trebek appears again in Season 8 as part of a documentary Robin made during her days as pop star Robin Sparkles.

Ralph Macchio and William Zabka as Themselves

Ralph Macchio and William Zabka on How I Met Your Mother

It's typical nowadays to see The Karate Kid stars Ralph Macchio and William Zabka together after reprising their memorable roles in the film's spin-off Cobra Kai. Back in 2013, How I Met Your Mother gave no mercy with their unexpected reunion.

After Barney makes it clear to his friends that he believes the real hero of The Karate Kid was Johnny Lawrence, both Johnny's and Daniel LaRusso's portrayers, Zabka and Macchio, surprise Barney at his bachelor party.

NEXT: Every Season of How I Met Your Mother Ranked, According to Reddit