Skip to content

In this repository we provide an overview of how to use APIs (Application Programming Interfaces) to retrieve data.

License

Notifications You must be signed in to change notification settings

MKB-Datalab/retrieving-data-with-apis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basics on Retrieving Data with APIs

source: Matthew Henry from Burst.

In this tutorial we give an overview of how to use APIs (Application Programming Interfaces) to retrieve data. Via API one is able to retrieve real time data as well as historical data. An example of interesting business application involves combining real time data together with historical data to predict demand of products.

We start this tutorial with some basics on JSON (JavaScript Object Notation) files which are standard form for transferring data through APIs. After that we start exploring some APIs starting by a simple one: The Open Movie database (OMDb) API. Then we take a look on how to get information from both NS and KNMI Weer APIs (Weerlive and meteoserver) . To close it we check out how to pull data from Twitter.

Data

Some JSON files built from data of OMDb are available here.

Models to be used to keep you APIs keys and Twitter credentials can be found in this folder.

Important: Remember to list these files in your .gitignore file to keep them safe when making your code available in GitHub, for example.

🔧 Tools

  • requests: HTTP library for Python that allows us to send HTTP requests in a simple way.
  • python-twitter, a python wrapper around the Twitter API.

💻 Install requirements

  • Install requirements using pip install -r requirements.txt.
    • Make sure you use Python 3.
    • You may want to use a virtual environment for this.

◀️ Back to repository main page

About

In this repository we provide an overview of how to use APIs (Application Programming Interfaces) to retrieve data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published