This script fetches award data from the USAspending API for a specified agency and extracts key details including recipient name, award type, award date, and total obligations in USD. In particular this is pulling from top tier Agency 015
.
- Python 3.x
requests
librarypandas
library
Ensure you have Python 3 installed and install the required dependencies:
pip install requests pandas
Run the script using:
python3 15.py
When executed, the script will print a raw API response similar to the following, and you should see:

This output changes depending on the latest available data from the API.
- This script fetches real-time data from USASpending, so results will vary based on current data availability.
- Ensure you have an active internet connection when running the script.