Using Google search volume as a proxy for investor attention, this paper provides evidence on the role attention plays in financial markets. We first show that abnormal Google search volume (ASVI) helps explain cross-sectional variations in trading activity, even after controlling for its important determinants. Specifically, ASVI is positively related to trading volume, order imbalance and liquidity. When the relation between stock returns and ASVI is examined, we find a strong positive relation in the month after attention shocks and a reversal over a longer holding period. We further conjecture that the attention effect is more pronounced in stocks with higher limits to arbitrage. For this purpose, we construct a limits-to-arbitrage index and show that limits to arbitrage play an important role in explaining the attention effect.