Quite a lot of websites (glassdoor for example) give access to data about jobs, salaries, etc. through a REST API. So basically I can make an API call, get results and show the data on my website. But isn't this stealing traffic from glassdoor?
If people can get the data on my site why would they visit glassdoor? Why does glassdoor bother giving away data for free?
You are not stealing traffic from them, you are accessing data they have collected from their traffic.
Reason they do it is it creates an ecosystem around their core platform.
The benefit to them is they become a central point of reference for other systems, like login and like with Facebook.
The chance of you wasting your time to build the same site and having your site be something that competes with them for their actual target market is very low. Remember the technical solution is only 20%-30% of the battle, there is marketing, relationships and for that site a strong network effect that you don't have.
Their intent is to provide you with the data you need to build something cool on top, which in turn helps them be a relevant big player in the eco-system.
Build something on top, which uses their data, is very cool, gets people using it, extends where they are going (say an iPhone or Android interface) and then present yourself as a buy out target for them.
This is a far more effective strategy for you than trying to do a copy cat site.