Ads on Google are getting more clicks than Wall Street expected — but it is costing Alphabet slightly more than estimated to get that traffic. Alphabet reported third-quarter earnings that topped analysts' expectations on Thursday and revenue that exceeded estimates. Share prices passed $1,020 in after-hours trading — surpassing the all-time intraday high of $1,016.31 set during the regular session on Oct. 18. Ad prices went down more than expected during the quarter, and traffic costs were higher than forecast — but revenue was boosted by a higher-than-predicted surge in the volume of clicks on Google ads across the world, especially in Asia. Google is again stressing this quarter "how we're solving big problems and making products that billions of people use every day," Chief Financial Officer Ruth Porat told CNBC's Josh Lipton. "And fundamental to all of this is our focus in building products with AI at their core, and we believe Google is leading the way here."

Here's how Alphabet did:

Adjusted EPS: $9.57 per share vs. $8.33 per share expected by a Thomson Reuters consensus estimate

Revenue: $27.77 billion vs. $27.2 billion expected by a Thomson Reuters consensus estimate That means Alphabet performed better than a year ago, as sales surged 24 percent. In the year-ago quarter, Alphabet reported revenue of $22.45 billion and adjusted earnings of $7.25 a share (revised downward from $9.06 a share.) Alphabet makes most of its money from ads: Cost per click is the amount that advertisers pay Google each time their ad is clicked, while aggregate paid clicks measures how many times users click on ads. TAC stands for traffic acquisition costs. Here's how Google's ads performed: TAC: $5.502 billion vs. $5.24 billion expected by StreetAccount

CPC: decline of 18 percent vs. decline of 16.3 percent expected by StreetAccount

Aggregate paid clicks: rise of 47 percent vs. 46.1 percent expected by StreetAccount

Wall Street looks for color on costs, while Washington wants answers

Google parent Alphabet has seen Class A shares rise about 25 percent this year as advertisers have continued to lean heavily on search advertising and YouTube. Network revenues were up 16 percent during the third quarter. "Our momentum is a result of investments that we've been making over many years in people, products and partnerships," Porat said. But a growing share of ads moving to mobile and programmatic formats has been putting a bit of pressure on Google's profit margins over the past year. Apple also said this quarter that Google would become the default web search option for Siri on iOS, a deal that has cost billions in the past. Google also spent money on Google Cloud data centers, content for YouTube, and hardware-related costs, Porat said on a conference call. Headcount also jumped to over 78,000 people, up from nearly 70,000 a year ago, as the company hired more cloud engineers. Porat said the company intends to continue investing in these areas. "Customers tell us they are switching to Google Cloud because of our prowess in data analytics, [and] our commitment to being an open platform," Google CEO Sundar Pichai said. While Alphabet's Google business primarily makes money through advertising, it also contains Google Shopping, Maps, YouTube, Android, Chrome, Google Play, virtual reality and cloud services. Google's "other" revenues, which includes hardware sales, were $3.45 billion during the quarter, up from $2.43 billion a year ago. Google launched its Pixel 2 phone this fall and has expanded options for Google Home and Google earbuds. And Google also agreed to buy part of HTC for $1.1 billion.

Preorders of Pixel on day one this year were more than double what they were last year. Sundar Pichai Google CEO

Alphabet's moonshot "other bets" include Waymo's self-driving cars, Google's start-up investing arms, Verily life sciences research and Nest smart-home devices. Revenue from "other bets" was $302 million during the quarter, more than the $263.4 million expected by a StreetAccount estimate. Porat has pushed Alphabet engineers to push toward achievable projects — right now, the "other bets" mainly make money through Google's Fiber internet sales, Nest products and Verily licensing. CapitalG is leading an investment round in Lyft. Porat told analysts on Thursday that Fiber has been pared down, but that Waymo and Nest are making progress. Porat said in a statement that the "terrific" quarter reflected "strength across Google and Other Bets," and a "culture of innovation." "What we're looking to do with 'other bets' is create valuable businesses over the longer term," Porat told CNBC. Google's quarterly results come as technology companies are expected to testify on Capitol Hill next week about the role of Russian political advertising in the 2016 election. Amid outcry about "fake news," Pichai said on the Thursday conference call that Google is changing its model to support journalists and prevent hacking of news sites. That's only one of the kerfuffles that Google has had with lawmakers this year. In Europe, Google's Shopping division may have to shift focus to deal with a record-breaking antitrust fine. "We do feel good about the steps we took, but it's early. Under the remedy, comparison shopping services have a new opportunity to use shopping ads to advertise on Google.com in the relevant countries," Porat told CNBC of the fine in Europe. "Our Google shopping service in these countries will operate in the same manner, bidding alongside comparison shopping services."

WATCH: YouTube has driven Alphabet's ad growth