Skip to main content
You can upload your own files such as PDFs, TXT documents, and other textual formats to Bigdata.com; they are then enriched (extraction, structure and annotation of the content) and indexed. Once uploaded, your files are enriched and indexed automatically, making them available for the Search and Research Agent endpoints. The script below uploads multiple files to Bigdata using the REST API: it reads a list of file paths, uploads each file (POST → PUT to presigned URL → poll until enrichment completes), and writes results to a CSV.
If your browser displays the python text instead of downloading it, press Ctrl+S (or Cmd+S on Mac) after the file opens.

Setup

  1. Create a virtual environment (recommended)
  2. Install dependencies
  3. Configure environment Copy .env to a new file if needed, then edit .env and set your Bigdata API key:
    The script loads variables from .env in the script directory. You can also set BIGDATA_API_KEY (and optionally BIGDATA_API_BASE_URL) in your shell. For general environment setup, see Prerequisites.

Usage

Run the script with these parameters: Create a list file (e.g. file_list.txt) in workdir with one filename or path per line:

Example: run the script

From the batch_file_upload directory, with BIGDATA_API_KEY set in .env:
Or set the API key in the shell and run from any directory:
The script will:
  1. Write a log file in workdir (e.g. bigdata_processing_20260312_120000.log).
  2. Write a result CSV in workdir (e.g. uploaded_file_ids_20260312_120000.csv) with columns: file_id, upload_status, file_path.
Example uploaded_file_ids_20260312_120000.csv:

Environment variables

Variables are loaded from .env in the script folder; you can override them in the shell.