FDIC API Python Wrapper
Python wrapper for the FDIC BankFind Suite API, providing access to FDIC banking data including institution details, financial reports, history, failures, and summary statistics. Simplifies querying the public FDIC REST API with Pythonic interfaces.
Warnings
- gotcha The pip package name uses a hyphen (fdic-api) but the Python import uses an underscore (fdic_api).
- gotcha The FDIC API has rate limits and may return 429 errors if too many requests are made in quick succession. The library does not implement automatic retry or backoff.
- gotcha Filter syntax uses the FDIC API's own query language, not Python expressions. String values in filters must be wrapped in escaped double quotes.
- gotcha Results are returned as a list of dictionaries with nested 'data' keys, not flat dictionaries.
- gotcha The default limit on results is small. If you need all matching records, you must handle pagination manually or set a higher limit.
Install
-
pip install requests
Imports
- InstitutionsQuery
from fdic_api import InstitutionsQuery
- FinancialsQuery
from fdic_api import FinancialsQuery
- HistoryQuery
from fdic_api import HistoryQuery
- FailuresQuery
from fdic_api import FailuresQuery
- SummaryQuery
from fdic_api import SummaryQuery
Quickstart
import requests
# No API key required - FDIC API is public
resp = requests.get(
"https://api.fdic.gov/banks/institutions",
params={"filters": "STNAME:California", "limit": 5, "fields": "NAME,CITY,STNAME,ASSET"}
)
resp.raise_for_status()
data = resp.json()
for inst in data["data"]:
print(f"{inst['data']['NAME']} - {inst['data']['CITY']}, {inst['data']['STNAME']}")