Interacting with a Web API

In this exercise we will use the Python requests library to interact with the ProPublica Congress API. Web APIs are specialized websites that make data available for many purposes, often for use in mobile applications, and business-to-business data workflows.

  1. Install the requests Python library with pip.

  2. Obtain the ProPublica Congress API key (from ELMS or register for your own)

  3. Write a program that uses the Get Current Members by State/District to get the members of the House of Representatives for the state of Maryland.

  4. For each representative use the Get Recent Bills by a Specific Member to get the bills they have introduced.

  5. List only the bills from the current Congress (117) that they have introduced.