OpenAPI Specification
openapi: 3.0.0
info:
description: API to serve banking industry data to the public.
version: 0.1.0
title: FDIC Bank Data API (Beta) Demographics Failures API
contact:
email: PublicDataFeedback@fdic.gov
servers:
- description: API to serve banking industry data to the public.
url: /banks
tags:
- name: Failures
description: List of bank failures to date
paths:
/failures:
get:
tags:
- Failures
security:
- ApiKeyAuth: []
summary: Get detail on historical bank failures from 1934 to present.
operationId: getFailures
description: Returns details on failed financial institutions.
parameters:
- in: query
name: api_key
description: Api key used for api.fdic.gov
required: false
schema:
type: string
- in: query
name: filters
description: "The filter criteria that refines the records returned. \nExamples: All values must be entered in UPPERCASE.\n* Filter by Location \n`CITYST:\"MEMPHIS, TN\"` \n* Filter all but a specified value \n`!(CITY:\"PITTSBURGH\")` \n* Filter by institution fail year range \n`FAILYR:[\"2015\" TO \"2016\"]`\n"
required: false
example: FAILYR:["2014" TO "2015"]
schema:
type: string
- in: query
name: fields
description: Comma delimited list of fields of failed financial institutions to return. All values must be entered in UPPERCASE.
required: false
example: NAME,CERT,FIN,CITYST,FAILDATE,SAVR,RESTYPE,RESTYPE1,QBFDEP,QBFASSET,COST
schema:
type: string
- in: query
name: sort_by
description: Field name by which to sort returned data. All values must be entered in UPPERCASE.
required: false
example: FAILDATE
schema:
type: string
default: FAILDATE
- in: query
name: sort_order
description: Indicator if ascending (ASC) or descending (DESC). All values must be entered in UPPERCASE.
required: false
example: DESC
schema:
type: string
default: ASC
- in: query
name: limit
description: The number of records to return. Default is 10 and maximum is 10,000.
required: false
example: 10
schema:
type: integer
minimum: 0
maximum: 10000
default: 100
- in: query
name: offset
description: The offset of page to return.
required: false
example: 0
schema:
type: integer
minimum: 0
default: 0
- in: query
name: total_fields
description: Fields to sum up (in a totals response object). Only numeric columns are valid. All values must be entered in UPPERCASE.
required: false
example: QBFDEP,QBFASSET,COST
schema:
type: string
- in: query
name: subtotal_by
description: The field by which data will be subtotaled (in totals response object). Only categorical values should be used. All values must be entered in UPPERCASE.
required: false
example: RESTYPE
schema:
type: string
- in: query
name: agg_by
description: The field by which data will be aggregated. All values must be entered in UPPERCASE.
required: false
example: FAILYR
schema:
type: string
- in: query
name: agg_term_fields
description: The field(s) for which aggregations will be counted for each unique term. All values must be entered in UPPERCASE.
required: false
example: RESTYPE
schema:
type: string
- in: query
name: agg_sum_fields
description: The field(s) for which aggregations will be summed or aggregated. All values must be entered in UPPERCASE.
required: false
example: QBFASSET,QBFDEP,COST
schema:
type: string
- in: query
name: agg_limit
description: The limit on how many aggregated results will be displayed
required: false
example: 10
schema:
type: integer
minimum: 0
maximum: 10000
default: 10
- $ref: '#/components/parameters/fileFormat'
- $ref: '#/components/parameters/fileDownload'
- $ref: '#/components/parameters/fileName'
responses:
'200':
description: Successful Operation
content:
application/json:
schema:
properties:
meta:
$ref: '#/components/schemas/metadata'
data:
type: array
items:
$ref: '#/components/schemas/failure'
totals:
$ref: '#/components/schemas/totals'
text/csv:
schema:
type: string
format: csv
'400':
description: bad input parameter
components:
schemas:
totals:
type: object
description: Total and subtotal data (additional properties based on fields selected)
properties:
count:
type: integer
description: Total result count
failure:
type: object
allOf:
- $ref: failure_properties.yaml
metadata:
type: object
properties:
total:
type: integer
description: Total query result count
parameters:
type: object
description: Query parameters supplied
index:
type: object
properties:
name:
type: string
description: name of index used to retrieve data
createTimestamp:
type: string
format: date-time
description: date/time index was created
parameters:
fileName:
in: query
name: filename
description: The filename to use when downloading data.
required: false
example: data_file
schema:
type: string
fileDownload:
in: query
name: download
description: Whether the data should be downloaded as a file.
required: false
example: false
schema:
type: boolean
enum:
- false
- true
fileFormat:
in: query
name: format
description: The format of the data to return.
required: false
example: json
schema:
type: string
enum:
- json
- csv