/Starwars_API_Request

Making requests to SWAPI using Pagination

Primary LanguageJupyter NotebookMIT LicenseMIT

API Requests with python : Pagination

A simple way to add pagination to your python requests when interacting with REST APIs

Dependencies

  • Requests
pip install requests
  • pandas
pip install pandas

About ?

This demo Python code makes use of the STARWARS API aka "SWAPI" which is a great resource for learning about the concept of REST APIS. There are various endpoints , but for this demo . i chose to use the 'planets' endpoint which contains exactly 60 records with various key value pairs.

NB : I have also attached a python script which contains a similar code should you prefer to run it as a script