There are many APIs out there for realtime and historical stock data as well as technical indicators, cryptocurrency ans sector analysis. Alpha Vantage gives free access to a wide range of data, and even more access at a reasonable price. Alpha vantage is compatible with any programming language, however they also provide a helper library for Python. Installing the helper library in Python allows a simplified moethod to download the most commonly used data. However, you can also make general API requests.
Alpha Vantage let's you get up and running quick for free. Just visit their site to register and get your API key. The videos below will show you where to go from there. You will see how to use the helper library alpha_vantage for Python and how to make general API requests. All requests return JSON and so are compatible with pretty much application or programming language out there.