Skip to main content

DOJ Multimedia Search API Client - Query and export document metadata

Project description

Epstein DOJ Multimedia Search Client

CLI tool to query the DOJ Multimedia Search API and export document metadata.

Installation

With uv installed:

uv sync

Or with pip:

pip install -r requirements.txt

Usage

Using the CLI module (recommended)

python3 -m epstein.cli --search "donald" --limit 50

Using legacy main.py (backward compatible)

python3 main.py --search "artificial intelligence" --limit 100

Basic search

python3 -m epstein.cli --search "donald" --limit 50

Search and save results to files

python3 -m epstein.cli --search "artificial intelligence" --limit 100 --prefix ai_docs

This creates three files:

  • ai_docs_TIMESTAMP.json - Full document metadata in JSON
  • ai_docs_TIMESTAMP.csv - Comma-separated values for spreadsheet import
  • ai_docs_TIMESTAMP_urls.txt - Plain text list of document URLs

Preview results without saving

python3 -m epstein.cli --search "epstein" --limit 20 --no-save --head 5

All options

python3 -m epstein.cli --help

Common options:

  • -s, --search TERM - Search query (empty = all documents)
  • -l, --limit N - Maximum number of results to fetch
  • -d, --delay SECONDS - Delay between API requests (default: 0.5)
  • -o, --prefix NAME - Output file prefix (default: epstein_library)
  • --no-save - Don't save to files, just display results
  • --head N - Number of top results to display (default: 10)

Examples

Search for documents mentioning "Trump":

python3 -m epstein.cli --search "Trump" --limit 50

Fetch 200 results with minimal delay:

python3 -m epstein.cli --search "banking" --limit 200 --delay 0.1

Get the first 5 results only, no file saving:

python3 -m epstein.cli --search "contacts" --limit 5 --no-save

Project Structure

scrape-doj/
├── epstein/              # Main package
│   ├── __init__.py       # Package initialization
│   ├── client.py         # API client logic
│   └── cli.py            # CLI interface
├── main.py               # Legacy entry point (backward compatible)
├── README.md
├── pyproject.toml        # Project configuration with uv
├── requirements.txt      # pip-compatible requirements
└── uv.lock               # Lockfile for reproducible installs

Output Format

Each result includes:

  • Title - Document filename
  • File - Actual filename
  • URL - Direct link to the PDF (properly URL-encoded)
  • Document ID - Unique identifier
  • Pages - Page range in document
  • File Size - Size in bytes
  • Words - Total word count
  • Indexed - When the document was indexed

Requirements

  • Python 3.9+
  • requests - HTTP library
  • beautifulsoup4 - HTML/XML parsing

API

You can also import and use the client directly:

from epstein import DOJMultimediaSearchClient

client = DOJMultimediaSearchClient()
documents = client.search_all(query="donald", max_results=50)

# Save results
client.save_results(documents, prefix="my_search")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doj_multimedia_search-0.2.0.tar.gz (61.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doj_multimedia_search-0.2.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file doj_multimedia_search-0.2.0.tar.gz.

File metadata

  • Download URL: doj_multimedia_search-0.2.0.tar.gz
  • Upload date:
  • Size: 61.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for doj_multimedia_search-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9b024049c7cf7c282a5ee3e1975b8b3f283983af97cc13e1334231159c308970
MD5 6c35124eddf8f2a46f6128580722e549
BLAKE2b-256 1c9e73c5b82b01555b6479d8bc9fa333145f72c3c6d29d24c75959c34269f384

See more details on using hashes here.

Provenance

The following attestation bundles were made for doj_multimedia_search-0.2.0.tar.gz:

Publisher: publish.yml on soumyadepp/epstein-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file doj_multimedia_search-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for doj_multimedia_search-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daec0437d34c5c3590ab220072c86d0c3b42b5b42225abcbaa34babd1e149872
MD5 b80bb6948360abb76bf82728b7656333
BLAKE2b-256 19e8b8682233f61705ffe12b393c8b005a36e2f2569f91bd5586b2a8dd55dcb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for doj_multimedia_search-0.2.0-py3-none-any.whl:

Publisher: publish.yml on soumyadepp/epstein-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page