Most professionals I've known use Capital IQ, which is expensive.
It's surprisingly tough to get broad, machine-readable market data for free but there are some cheaper options. Check this thread: https://www.reddit.com/r/SecurityAnalysis/comments/2ci5du/ca...
Or you could always scrape Yahoo Finance :)