Type: Package
Title: R Interface to 'FFIEC Central Data Repository REST API' Service
Version: 0.2.0
Description: Provides a simplified interface to the Central Data Repository 'REST API' service made available by the United States Federal Financial Institutions Examination Council ('FFIEC'). Contains functions to retrieve reports of Condition and Income (Call Reports) and Uniform Bank Performance Reports ('UBPR') in list or tidy data frame format for most 'FDIC' insured institutions. See https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf for the official 'REST API' documentation published by the 'FFIEC'.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.3
Depends: R (≥ 4.1)
Imports: cli, dplyr, httr2, jsonlite, purrr, rlang, stringr, tibble, xml2
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
URL: https://github.com/ketchbrookanalytics/ffiec, https://ketchbrookanalytics.github.io/ffiec/
BugReports: https://github.com/ketchbrookanalytics/ffiec/issues
Config/testthat/edition: 3
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2026-04-18 14:23:44 UTC; root
Author: Michael Thomas [aut, cre], Ketchbrook Analytics [cph, fnd], Dylan Hughes [ctb]
Maintainer: Michael Thomas <mthomas@ketchbrookanalytics.com>
Repository: CRAN
Date/Publication: 2026-04-18 14:40:02 UTC

Retrieve Facsimile

Description

Retrieves Call Report or UBPR facsimile data from the FFIEC Central Data Repository API for the requested financial institution.

Usage

get_facsimile(
  user_id = Sys.getenv("FFIEC_USER_ID"),
  bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"),
  reporting_period_end_date,
  fi_id_type = c("ID_RSSD", "FDICCertNumber", "OCCChartNumber", "OTSDockNumber"),
  fi_id
)

get_ubpr_facsimile(
  user_id = Sys.getenv("FFIEC_USER_ID"),
  bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"),
  reporting_period_end_date,
  fi_id_type = c("ID_RSSD", "FDICCertNumber", "OCCChartNumber", "OTSDockNumber"),
  fi_id
)

Arguments

user_id

(String) The UserID for authenticating against the FFIEC API

bearer_token

(String) The Bearer Token for authenticating against the FFIEC API

reporting_period_end_date

(String, character vector, Date, or Date vector) One or more reporting period end dates. Character values must be formatted as "MM/DD/YYYY". Date objects are also accepted and will be coerced to the required format automatically.

fi_id_type

(String) The type of identifier being provided; one of c("ID_RSSD", "FDICCertNumber", "OCCChartNumber", "OTSDockNumber"); default is "ID_RSSD"

fi_id

(String or character vector) One or more financial institution identifiers (can also be supplied as an integer vector)

Value

A tibble containing the facsimile data.

References

https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf

Examples

if (!no_creds_available()) {
  # Assume you have set the following environment variables:
  # - FFIEC_USER_ID
  # - FFIEC_BEARER_TOKEN

  # Retrieve facsimile data for reporting period 2025-03-31 for institution
  # with ID RSSD "480228"
  get_facsimile(
    reporting_period_end_date = "03/31/2025",
    fi_id = 480228
  )

  # Retrieve UBPR facsimile data for reporting period 2025-03-31 for
  # institution with FDIC Cert Number "3510"
  get_ubpr_facsimile(
    reporting_period_end_date = "03/31/2025",
    fi_id_type = "FDICCertNumber",
    fi_id = "3510"
  )

  # Retrieve facsimile data for reporting periods 2025-03-31 and 2025-06-30
  # for institutions with ID RSSD of "480228" and "451965"
  get_facsimile(
    reporting_period_end_date = c("03/31/2025", "06/30/2025"),
    fi_id = c("480228", "451965")
  )

  # Retrieve UBPR data for reporting periods 2025-03-31 and 2025-06-30
  # for institution with ID RSSD of "480228"
  get_ubpr_facsimile(
    reporting_period_end_date = c("03/31/2025", "06/30/2025"),
    fi_id = 480228
  )
}

Retrieve Filers Since Date

Description

Retrieves filer information from the FFIEC Central Data Repository API for filers updated since a specified date.

Usage

get_filers_since_date(
  user_id = Sys.getenv("FFIEC_USER_ID"),
  bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"),
  reporting_period_end_date,
  last_update_date_time,
  as_data_frame = FALSE
)

Arguments

user_id

(String) The UserID for authenticating against the FFIEC API

bearer_token

(String) The Bearer Token for authenticating against the FFIEC API

reporting_period_end_date

(String or Date) The reporting period end date. Character values must be formatted as "MM/DD/YYYY". Date objects are also accepted and will be coerced to the required format automatically.

last_update_date_time

(String) Filter for records updated since this date/time. See Details for formatting options.

as_data_frame

(Logical) Should the result be returned as a tibble? Default is FALSE.

Details

Set the last_update_date_time value to the last time you ran the method to retrieve only those institutions that have filed a newer report. Possible formatting options include:

Value

A list containing the parsed JSON response from the API, where each element in the list represents an RSSD ID value. If as_data_frame = TRUE, then the list is converted to a tibble (and returned as such).

References

https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf

Examples

if (!no_creds_available()) {
  # Assume you have set the following environment variables:
  # - FFIEC_USER_ID
  # - FFIEC_BEARER_TOKEN

  # Retrieve filers since 2025-03-31, as of 2025-04-15 and return as a list
  get_filers_since_date(
    reporting_period_end_date = "03/31/2025",
    last_update_date_time = "04/15/2025"
  )

  # Retrieve filers since 2025-03-31, as of 2025-04-15 21:00:00.000 and return
  # as a tibble
  get_filers_since_date(
    reporting_period_end_date = "03/31/2025",
    last_update_date_time = "04/15/2025 21:00:00.000",
    as_data_frame = TRUE
  )
}

Retrieve Filers Submission Date Time

Description

Retrieves filer information from the FFIEC Central Data Repository API for the ID RSSDs and submission date and time of the reporters who have filed after the provided last_update_date_time and whose new filings are available for public distribution.

Usage

get_filers_submission_datetime(
  user_id = Sys.getenv("FFIEC_USER_ID"),
  bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"),
  reporting_period_end_date,
  last_update_date_time,
  as_data_frame = TRUE
)

Arguments

user_id

(String) The UserID for authenticating against the FFIEC API

bearer_token

(String) The Bearer Token for authenticating against the FFIEC API

reporting_period_end_date

(String or Date) The reporting period end date. Character values must be formatted as "MM/DD/YYYY". Date objects are also accepted and will be coerced to the required format automatically.

last_update_date_time

(String) Filter for records updated since this date/time. See Details for formatting options.

as_data_frame

(Logical) Should the result be returned as a tibble? Default is FALSE.

Details

Set the last_update_date_time value to the last time you ran the method to retrieve only those institutions that have filed a newer report. Possible formatting options include:

Value

A list containing the parsed JSON response from the API, where each element in the list represents an RSSD ID value. If as_data_frame = TRUE, then the list is converted to a tibble (and returned as such).

References

https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf

Examples

if (!no_creds_available()) {
  # Assume you have set the following environment variables:
  # - FFIEC_USER_ID
  # - FFIEC_BEARER_TOKEN

  # Retrieve filers since 2025-03-31, as of 2025-04-15 and return as a tibble
  get_filers_submission_datetime(
    reporting_period_end_date = "03/31/2025",
    last_update_date_time = "04/15/2025"
  )

  # Retrieve filers since 2025-03-31, as of 2025-04-15 21:00:00.000 and return
  # as a list
  get_filers_submission_datetime(
    reporting_period_end_date = "03/31/2025",
    last_update_date_time = "04/15/2025 21:00:00.000",
    as_data_frame = FALSE
  )
}

Retrieve Panel of Reporters

Description

Retrieves filer information from the FFIEC Central Data Repository API for the financial institutions in the Panel of Reporters (POR) expected to file for a given Call reporting period.

Usage

get_panel_of_reporters(
  user_id = Sys.getenv("FFIEC_USER_ID"),
  bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"),
  reporting_period_end_date,
  as_data_frame = TRUE
)

Arguments

user_id

(String) The UserID for authenticating against the FFIEC API

bearer_token

(String) The Bearer Token for authenticating against the FFIEC API

reporting_period_end_date

(String or Date) The reporting period end date. Character values must be formatted as "MM/DD/YYYY". Date objects are also accepted and will be coerced to the required format automatically.

as_data_frame

(Logical) Should the result be returned as a tibble? Default is TRUE.

Value

A tibble containing the parsed JSON response from the API of filer information since the given reporting_period_end_date date value. If as_data_frame = FALSE, then the result is returned as a nested list object, where each element represents a unique ID_RSSD value.

References

https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf

Examples

if (!no_creds_available()) {
  # Assume you have set the following environment variables:
  # - FFIEC_USER_ID
  # - FFIEC_BEARER_TOKEN

  # Retrieve expected filers for reporting period 2025-03-31 and return as a
  # tibble
  get_panel_of_reporters(
    reporting_period_end_date = "03/31/2025"
  )

  # Retrieve expected filers for reporting period 2025-03-31 and return as a
  # list
  get_panel_of_reporters(
    reporting_period_end_date = "03/31/2025",
    as_data_frame = FALSE
  )
}

Retrieve Reporting Periods

Description

Retrieves Call Report or UBPR filer information from the FFIEC Central Data Repository API for available reporting periods.

Usage

get_reporting_periods(
  user_id = Sys.getenv("FFIEC_USER_ID"),
  bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"),
  as_data_frame = FALSE
)

get_ubpr_reporting_periods(
  user_id = Sys.getenv("FFIEC_USER_ID"),
  bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"),
  as_data_frame = FALSE
)

Arguments

user_id

(String) The UserID for authenticating against the FFIEC API

bearer_token

(String) The Bearer Token for authenticating against the FFIEC API

as_data_frame

(Logical) Should the result be returned as a tibble? Default is FALSE.

Value

A list containing the parsed JSON response from the API, where each element in the list represents an available reporting period. If as_data_frame = TRUE, then the list is converted to a tibble (and returned as such).

References

https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf

Examples

if (!no_creds_available()) {
  # Assume you have set the following environment variables:
  # - FFIEC_USER_ID
  # - FFIEC_BEARER_TOKEN

  # Retrieve reporting periods and return as a list
  get_reporting_periods()

  # Retrieve UBPR reporting periods and return as a tibble
  get_ubpr_reporting_periods(as_data_frame = TRUE)
}

Handle missing UserID / Bearer Token values without throwing an error for unit testing purposes

Description

Handle missing UserID / Bearer Token values without throwing an error for unit testing purposes

Usage

no_creds_available(
  user_id = Sys.getenv("FFIEC_USER_ID"),
  bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN")
)

Arguments

user_id

(String) The UserID for authenticating against the FFIEC API

bearer_token

(String) The Bearer Token for authenticating against the FFIEC API

Details

Intended for internal use.

Value

(Logical) FALSE if a non-empty user_id and bearer_token have been supplied; otherwise TRUE.