The FDIC Branch Analyzer provides a RESTful API for generating banking market analysis reports. This API allows external applications to integrate with the analysis engine and generate reports programmatically.
https://api.fdic-analyzer.ncrc.org
All API requests require authentication using API keys. Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY
POST /api/v1/analyze
Generate a comprehensive banking market analysis report.
{
"counties": ["Cook County, Illinois", "Los Angeles County, California"],
"years": [2020, 2021, 2022],
"format": "both",
"include_ai_analysis": true
}
counties
(array, required): List of counties to analyzeyears
(array, required): List of years to analyze (2017-2024)format
(string, optional): Output format - “excel”, “pdf”, or “both” (default: “both”)include_ai_analysis
(boolean, optional): Include AI-generated insights (default: true){
"success": true,
"job_id": "job_12345",
"message": "Analysis started successfully",
"estimated_completion": "2024-01-15T10:30:00Z"
}
GET /api/v1/status/{job_id}
Check the status of an analysis job.
{
"success": true,
"job_id": "job_12345",
"status": "completed",
"progress": 100,
"download_url": "https://api.fdic-analyzer.ncrc.org/download/job_12345",
"created_at": "2024-01-15T10:00:00Z",
"completed_at": "2024-01-15T10:25:00Z"
}
GET /api/v1/download/{job_id}
Download the generated report files.
Returns a ZIP file containing:
fdic_branch_analysis.xlsx
- Excel reportfdic_branch_analysis.pdf
- PDF reportanalysis_metadata.json
- Report metadataGET /api/v1/counties
Get a list of all available counties in the database.
{
"success": true,
"counties": [
"Cook County, Illinois",
"Los Angeles County, California",
"Harris County, Texas"
],
"total_count": 3142
}
GET /api/v1/years
Get a list of available years in the database.
{
"success": true,
"years": [2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024],
"total_count": 8
}
{
"success": false,
"error": "Invalid parameters",
"details": {
"counties": "At least one county is required",
"years": "Years must be between 2017 and 2024"
}
}
{
"success": false,
"error": "Invalid API key"
}
{
"success": false,
"error": "Job not found"
}
{
"success": false,
"error": "Analysis failed",
"details": "BigQuery connection error"
}
Rate limit headers are included in responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1642248000
import requests
class FDICAnalyzer:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = "https://api.fdic-analyzer.ncrc.org"
def analyze(self, counties, years):
headers = {"Authorization": f"Bearer {self.api_key}"}
data = {"counties": counties, "years": years}
response = requests.post(
f"{self.base_url}/api/v1/analyze",
headers=headers,
json=data
)
return response.json()
def get_status(self, job_id):
headers = {"Authorization": f"Bearer {self.api_key}"}
response = requests.get(
f"{self.base_url}/api/v1/status/{job_id}",
headers=headers
)
return response.json()
class FDICAnalyzer {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseUrl = 'https://api.fdic-analyzer.ncrc.org';
}
async analyze(counties, years) {
const response = await fetch(`${this.baseUrl}/api/v1/analyze`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ counties, years })
});
return response.json();
}
async getStatus(jobId) {
const response = await fetch(`${this.baseUrl}/api/v1/status/${jobId}`, {
headers: {
'Authorization': `Bearer ${this.apiKey}`
}
});
return response.json();
}
}
You can configure webhooks to receive notifications when analysis jobs complete.
{
"webhook_url": "https://your-app.com/webhooks/fdic-analyzer",
"events": ["analysis.completed", "analysis.failed"],
"secret": "your-webhook-secret"
}
{
"event": "analysis.completed",
"job_id": "job_12345",
"timestamp": "2024-01-15T10:25:00Z",
"data": {
"counties": ["Cook County, Illinois"],
"years": [2020, 2021, 2022],
"download_url": "https://api.fdic-analyzer.ncrc.org/download/job_12345"
}
}
{
"analysis_id": "job_12345",
"counties": ["Cook County, Illinois"],
"years": [2020, 2021, 2022],
"total_records": 150,
"total_banks": 25,
"generated_at": "2024-01-15T10:25:00Z",
"ai_analysis_included": true,
"file_size": {
"excel": 245760,
"pdf": 512000
}
}
For API support and questions: