A simple script that takes a Grants.gov URL, extracts the funding opportunity data, and saves it in a structured format both JSON and CSV.
- Takes a Grants.gov opportunity URL
- Calls the Grants.gov API to get the data
- Maps the response to a schema
- Applies rule-based tags (simple keyword matching)
- Saves two output files:
foa.jsonandfoa.csv
| main.py
| requirements.txt
| out/foa.json
| out/foa.csv
| README.md
Clone this repository:
https://github.com/sritaaa/AI-Powered-Funding-Intelligence.gitInstall dependencies:
pip install -r requirements.txtpython main.py --url "https://simpler.grants.gov/opportunity/e1f118fb-8e9d-4c86-b0c3-e9e5c5e0b59d" --out_dir ./out--url→ the Grants.gov opportunity page URL--out_dir→ folder where output files are saved (created automatically if it doesn't exist)
https://simpler.grants.gov/opportunity/e1f118fb-8e9d-4c86-b0c3-e9e5c5e0b59d
URL -> extract opportunity ID -> call API -> map fields to schema -> apply tags -> save JSON + CSV
API key for Grants.gov is hardcoded rather than stored in an env file.
API reference: Grants.gov API Docs