Is there a native and free API and DB to request information such as:
All the companies which their
P/Eratio is greater than 50
The closing prices of stock
Try the yahoo screener: http://screener.finance.yahoo.com/newscreener.html
The java version will run on windows/osx/linux and you can download to a csv.
Edit: the java version no longer works.
This link is the best yahoo has. https://screener.finance.yahoo.com/stocks.html
Quandl has all of this data as well so people can generate their own data.