Wall Street edged higher on Thursday as investors looked beyond disappointing earnings from Ford and bought shares in Apple, while Alphabet surged after the bell following its quarterly report.

It was the 10th session of range-bound trading, following a sharp rally in late June and early July that hit record highs and has left the S&P 500 up 6 percent for the year.

In extended trade, Alphabet jumped 4 per cent after the Google parent-company reported stronger-than-expected revenue. Amazon.com (AMZN.O) rose 1.7 per cent after its quarterly report.

"Tech has been pretty much the strongest sector over the last month. Momentum players are focusing to buy on pullbacks," said Michael Matousek, head trader at U.S. Global Investors in San Antonio.

Earlier, Apple (AAPL.O) rose 1.35 per cent, giving the S&P 500 its biggest lift.

Six of the 10 major S&P 500 sectors ended higher, with the consumer staples sector .SPLRCS up 0.47 per cent.

Ford reported weak China sales and declared that the U.S. auto industry's long recovery was at an end, triggering a 8.16-per cent fall in its shares. The stock was the biggest drag on the S&P 500 index.

The carmaker's dismal forecast rattled the wider automobile market, with shares of General Motors (GM.N) falling 3.22 percent and Fiat Chrysler (FCAU.N) 4.77 per cent.

A report by the U.S. Labor Department showed that the number of people claiming unemployment benefits rose more than expected to 266,000 for the week ended July 22.

The Dow Jones industrial average .DJI edged down 0.09 per cent to end at 18,456.35 points and the S&P 500 .SPX gained 0.16 per cent to 2,170.06. The Nasdaq Composite.IXIC added 0.3 per cent to 5,154.98.

Canada's main stock index eked out a small overall gain on Thursday, as earnings hits and misses pulled investors in opposite directions.

The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE unofficially ended up 6.18 points, or 0.04 per cent, at 14,552.72.

Advancing issues outnumbered declining ones on the NYSE by a 1.07-to-1 ratio; on Nasdaq, a 1.13-to-1 ratio favored decliners.

The S&P 500 posted 36 new 52-week highs and no new lows; the Nasdaq Composite recorded 114 new highs and 25 new lows.

About 6.6 billion shares changed hands on U.S. exchanges, just below the nearly 6.7 billion daily average over the past 20 sessions.