Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

CBP Border Enforcement Database

U.S. Customs and Border Protection (CBP) enforcement records released through the Deportation Data Project (DDP) under the Freedom of Information Act (FOIA). They include Border Patrol apprehensions and encounters, Office of Field Operations (OFO) inadmissibility events at ports of entry, Title 42 expulsions and CBP One appointments. An inadmissibility event records a person arriving at a port of entry who was deemed inadmissible. Use the table guide to select a record type and its actual coverage before querying. The eight tables contain about 51.3 million stored rows across overlapping and superseded series, not that many distinct people or events. Some periods have substantial gaps, and no stable cross-release person linkage is supplied. Do not add overlapping series or treat missing months as zero activity.

Start querying

Preview up to five apprehension records dated 2023 onward, showing the event timestamp (event_datetime) and recorded citizenship. These released records have coverage gaps and are not a complete count for the period.

Choose R or Python. Install the datapond package once: use install.packages("datapond") in R, or run python -m pip install datapond in a terminal.

R

library(datapond)
con <- dp_connect("cbp")
tryCatch({
  DBI::dbExecute(con, "SET threads=1")
  DBI::dbExecute(con, "SET memory_limit='128MiB'")
  DBI::dbExecute(con, "SET max_temp_directory_size='0B'")
  print(DBI::dbGetQuery(con, "SELECT event_datetime,citizenship FROM apprehensions WHERE event_datetime>=TIMESTAMP '2023-01-01' LIMIT 5"))
}, finally = dp_disconnect(con))

Python

import datapond
con = datapond.connect('cbp')
try:
    con.execute("SET threads=1")
    con.execute("SET memory_limit='128MiB'")
    con.execute("SET max_temp_directory_size='0B'")
    print(con.execute("""SELECT event_datetime,citizenship FROM apprehensions WHERE event_datetime>=TIMESTAMP '2023-01-01' LIMIT 5""").fetchall())
finally:
    con.close()

Queries run on your computer and read the byte ranges they need. A small result can still require a large scan. These examples limit DuckDB to one thread and a 128 MiB buffer pool with disk spill disabled; that is not a limit on the entire R or Python process. Larger analyses may need more memory or a local download with enough disk space.

Tables and coverage

51,345,742 stored rows across eight tables, including overlapping and superseded records. FY means fiscal year; CY means calendar year. Apprehension coverage starts in October 2007 (FY2008).

Table Description Row Count Column Count
apprehensions Border Patrol apprehensions between ports of entry, one row per person apprehended (FOIA releases covering Oct 2007 - Dec 2025; monthly gaps where CBP has not yet released data) 7,907,911 74
apprehensions_origin Border Patrol apprehensions with place of birth (country/state/city), one row per apprehension, FY2000 - FY2022 16,719,589 16
encounters Border Patrol encounters (apprehensions with prior-encounter history and seizure fields), FY2010 - FY2018 and Oct 2022 - Sep 2024 7,164,459 38
inadmissibles Office of Field Operations events where a person arriving at a port of entry was deemed inadmissible, one row per event, CY2014 - Jan 2026 11,591,432 35
title42_expulsions Title 42 expulsions by Border Patrol, one row per expulsion, FY2020 - FY2022 1,976,471 24
cbp_one CBP One app appointments at ports of entry, individual-level extract, Jan 12 - Oct 31 2023 323,686 19
cbp_one_monthly CBP One monthly appointment counts by port of entry and citizenship (five overlapping FOIA extracts; see source_file) 27,731 19
inadmissibles_superseded Older overlapping inadmissibility release records retained for reference, not additional events to add to inadmissibles (see _files.superseded_reason) 5,634,463 41

See the data dictionary for column definitions.

Coverage gaps and interpretation

The apprehensions series has gaps in April–September 2014, October 2022–March 2024, July–November 2024 and August 2025. Missing months are not zero activity. apprehensions_origin is a separate, overlapping series with birthplace information; do not add it to apprehensions.

The main inadmissibles table uses 19 selected files covering non-overlapping periods; 23 older overlapping releases are retained in inadmissibles_superseded for comparison, not additional event counts. Choose one source_file when using the five overlapping cbp_one_monthly extracts. No stable cross-release person linkage is supplied.

Source-tracking reference table

_files describes the 121 source files, coverage windows, source row counts and URLs, plus in_base_table and superseded_reason. Use it to see which releases were selected. Coverage windows come from the project’s file names/pages; individual event dates can extend slightly beyond them.

Redaction markers such as (b)(6) are stored as NULL. A field absent from a release is also NULL; check column availability before comparing periods. Event dates are stored as timestamps.

More example queries

Count released apprehension records by year and recorded citizenship from 2023 onward. This direct DuckDB example is an alternative to the package connection above; the coverage gaps still apply to the result.

INSTALL httpfs; LOAD httpfs;
ATTACH 'https://huggingface.co/datasets/Nason/cbp-database/resolve/main/cbp.duckdb' AS cbp (READ_ONLY);

SELECT EXTRACT(YEAR FROM event_datetime) AS year, citizenship, COUNT(*) AS apprehensions
FROM cbp.apprehensions WHERE event_datetime >= '2023-01-01'
GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 20;

Sources and maintenance

Sources and build documentation

Source: Deportation Data Project (CBP FOIA releases). License: CC-0.

The Deportation Data Project obtained the individual-level records through FOIA litigation. The 121 release files are harmonized into one schema per record type, using selected files covering non-overlapping periods for the main tables.

Build pipeline, header crosswalk, release-selection decisions and caveats: https://github.com/ian-nason/cbp-database Source: https://deportationdata.org/data/cbp.html (CC0).

R with DBI and duckdb

Install the dependencies once with install.packages(c("DBI", "duckdb")).

library(DBI)
con <- dbConnect(duckdb::duckdb())
dbExecute(con, "INSTALL httpfs")
dbExecute(con, "LOAD httpfs")
dbExecute(con, "ATTACH 'https://huggingface.co/datasets/Nason/cbp-database/resolve/main/cbp.duckdb' AS cbp (READ_ONLY)")
dbGetQuery(con, "SELECT event_datetime, citizenship FROM cbp.apprehensions LIMIT 5")
dbDisconnect(con, shutdown = TRUE)

DuckDB uses HTTP range requests; queries run on your machine and may need substantial memory or download data. A LIMIT does not guarantee a small scan.

Or with the datapond packages: pip install datapond / pak::pak("datapond-db/datapond-r").

Build pipeline, header crosswalk, tiling decisions and caveats: https://github.com/ian-nason/cbp-database Source: https://deportationdata.org/data/cbp.html (CC0).

Downloads last month
304