<P> As one of the longest - established and most successful professional baseball teams, the franchise has won the most games of any team in the history of American baseball . The team was the first major league team based in New York City, most memorably playing at the legendary Polo Grounds . They have won 23 NL pennants and have played in 20 World Series competitions--both NL records . The Giants' eight World Series championships rank second in the National League and are tied for fourth overall (New York Yankees are first with 27, then the St. Louis Cardinals (the National League record - holders) with 11, the Oakland Athletics with 9, and the Boston Red Sox also with 8). The Giants have played in the World Series 20 times--14 times in New York, six in San Francisco--but boycotted the event in 1904 . </P> <P> Playing as the New York Giants, they won 14 pennants and five World Series championships behind managers such as John McGraw and Bill Terry and players such as Christy Mathewson, Carl Hubbell, Mel Ott, Bobby Thomson, and Willie Mays . The Giants' franchise has the most Hall of Fame players in all of professional baseball . The Giants' rivalry with the Dodgers is one of the longest - standing and biggest rivalries in American sports . The teams began their rivalry as the New York Giants and Brooklyn Dodgers, respectively, before both franchises moved west for the 1958 season . </P> <P> The Giants have won six pennants and three World Series championships since arriving in San Francisco . Those three championships have come in 2010, 2012, and most recently in 2014, having defeated the Kansas City Royals four games to three during the 2014 World Series . </P> <P> The Giants are the only major professional sports team based in the City and County of San Francisco, following the San Francisco 49ers' relocation to Santa Clara, California in 2014 . They will be joined by the Golden State Warriors once they move to the Chase Center in 2019 . </P>

When did the san francisco giants win their first world series