Statista does not allow for crawling systematically across our data. If you
attempt to do so; we will disable your API key.
- Configure variables needed for HTTP client
- Execute an API query
- Render information returned back by the Statista API
1. Configure variables needed for HTTP client
You’ll connect to the API using a request header:x-api-key. In order to fetch
content, you’ll need to decide which endpoint you want to request from;
/statistics, /marketInsights, /studies or /infographics. See API Reference.
For this example we’ll fetch content from /statistics with
two parameters.
2. Execute an API query
Next, we can execute a request and get a response from the API.3. Render information returned back by the Statista API
While you can do this in a multitude of ways; we’ll show an example for putting the received data into a pandas data frame - and show you what that looks like:
(See API Reference for more info on what data is available)