openapi: 3.1.0 info: title: CFPB Consumer Complaint Database Aggregations API description: Public REST + JSON API for searching the Consumer Financial Protection Bureau's Consumer Complaint Database (CCDB), a daily-updated record of complaints submitted by consumers about financial products and services and the companies that respond to them. The API powers the public CCDB search experience at consumerfinance.gov/data-research/consumer-complaints and is documented at cfpb.github.io/ccdb5-api. version: '1' contact: name: CFPB Open Tech url: https://cfpb.github.io/ license: name: Creative Commons CC0 1.0 Universal url: https://creativecommons.org/publicdomain/zero/1.0/ servers: - url: https://www.consumerfinance.gov/data-research/consumer-complaints/search/api/v1 description: Production CCDB search API tags: - name: Aggregations paths: /view/nationwide/aggregations: get: operationId: getNationwideAggregations summary: Nationwide aggregation report description: Aggregated HMDA totals across the entire United States for a given year and filter set. tags: - Aggregations parameters: - $ref: '#/components/parameters/Years' - $ref: '#/components/parameters/Actions' - $ref: '#/components/parameters/LoanTypes' - $ref: '#/components/parameters/LoanPurposes' - $ref: '#/components/parameters/Race' - $ref: '#/components/parameters/Ethnicity' - $ref: '#/components/parameters/Sex' responses: '200': description: Aggregations content: application/json: {} /view/aggregations: get: operationId: getAggregations summary: Aggregation report by LEI or geography tags: - Aggregations parameters: - $ref: '#/components/parameters/Years' - name: leis in: query schema: type: array items: type: string - name: states in: query schema: type: array items: type: string minLength: 2 maxLength: 2 - name: msamds in: query schema: type: array items: type: string - name: counties in: query schema: type: array items: type: string - $ref: '#/components/parameters/Actions' - $ref: '#/components/parameters/LoanTypes' responses: '200': description: Aggregations content: application/json: {} components: parameters: Ethnicity: name: ethnicities in: query schema: type: array items: type: string LoanPurposes: name: loan_purposes in: query schema: type: array items: type: integer Actions: name: actions_taken in: query schema: type: array items: type: integer minimum: 1 maximum: 8 Race: name: races in: query schema: type: array items: type: string Years: name: years in: query required: true schema: type: array items: type: integer minimum: 2018 LoanTypes: name: loan_types in: query schema: type: array items: type: integer minimum: 1 maximum: 4 Sex: name: sexes in: query schema: type: array items: type: string