Introduction to Using APIs with Python
Part 1: Introduction
Part 3: Simple API
Search for an institution from the Integrated Postsecondary Education Data System. Click to expand Institution Characteristics and make note of the
Modify the script
ipeds_api.pyby replacing the
UnitIDon Row 19 with the
UnitIDfor the institution you wish to query. You can also change the variables returned based on what is available (see the API documentation).
Part 4: Authentication
Register as a developer to access the Google Maps API: https://developers.google.com/maps/documentation/geocoding/start.
Go to Web Services > Geocoding API. Click GET A KEY in the upper right-hand corner. Copy your key to a plain text file called
google_auth.txtand save it in the same directory as your script.
Your script and authorization document (the text file with your API key) must be in the same directory, and filename must match what is provided in your script. When you run the script, it should display your API key.
Enter the following into a browser, replacing
<my_api_key>with your key.