> For a complete page index of the Captain API documentation, fetch https://docs.captain.dev/llms.txt?excludeSpec=true

# Supported File Types

> Every file type and extension Captain indexes, grouped by category.

## Agent Quick Reference - Supported File Types

186 extensions in seven categories.

Documents (3): pdf, docx, doc.
Sheets (4): xlsx, xls, csv, tsv.
Images (7): png, jpg, jpeg, gif, bmp, tiff, webp.
Audio (7): mp3, wav, m4a, ogg, flac, aac, wma.
Video (7): mp4, mov, avi, mkv, webm, flv, wmv.
Email (2): msg, eml. An email becomes one text document for the message and one document per attachment, linked by relations.
Text and code (156): txt, md, json, yaml, yml, py, pyi, pyw, ipynb, js, mjs, cjs, jsx, ts,
tsx, mts, cts, coffee, java, kt, kts, scala, sbt, groovy, gradle, clj, cljs, edn, c, h, cpp,
cc, cxx, hpp, hxx, hh, m, mm, cs, csx, fs, fsx, razor, cshtml, go, rs, rb, erb, rake,
gemspec, php, phtml, swift, pl, pm, lua, r, rmd, dart, jl, nim, zig, ex, exs, erl, hrl, hs,
elm, ml, mli, s, asm, vbs, applescript, sql, ddl, sh, bash, zsh, fish, ksh, csh, tcsh, ps1,
psm1, psd1, bat, cmd, html, htm, xhtml, shtml, css, scss, sass, less, styl, vue, svelte,
astro, hbs, ejs, pug, twig, liquid, njk, mustache, markdown, mdown, mdx, rst, adoc,
asciidoc, org, tex, bib, textile, text, diff, patch, toml, ini, cfg, conf, properties, lock,
tf, tfvars, hcl, nix, cmake, mk, bzl, bazel, dockerfile, log, json5, jsonc, jsonl, ndjson,
geojson, graphql, gql, proto, xml, xsl, xslt, xsd, dtd, rss, atom, xaml, svg, drawio,
csproj, sln.

Text and code files are indexed as plain text (no syntax parsing). Extensionless files
from cloud storage connectors are content-sniffed and indexed when the content is a
supported type. Compiled or binary variants (pyc, class, o, so, dll, wasm, jar, svgz),
plist, and secret-bearing files (env, pem, key, crt) are not indexed.

See [File Size Limits](/guides/file-size-limits) for the per-type size ceilings.

Captain indexes the 186 file types below, sent through a direct upload, the dashboard, raw
text, or a cloud storage connector. Each one is parsed, chunked, and embedded for search.

| Category      | Count | Extensions                                                                                                              |
| ------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- |
| Documents     | 3     | `pdf`, `docx`, `doc`                                                                                                    |
| Sheets        | 4     | `xlsx`, `xls`, `csv`, `tsv`                                                                                             |
| Images        | 7     | `png`, `jpg`, `jpeg`, `gif`, `bmp`, `tiff`, `webp`                                                                      |
| Audio         | 7     | `mp3`, `wav`, `m4a`, `ogg`, `flac`, `aac`, `wma`                                                                        |
| Video         | 7     | `mp4`, `mov`, `avi`, `mkv`, `webm`, `flv`, `wmv`                                                                        |
| Email         | 2     | `msg`, `eml`                                                                                                            |
| Text and code | 156   | `txt`, `md`, `json`, `yaml`, and 151 source, markup, and config extensions listed under [Text and code](#text-and-code) |

## Documents

How the document lane works, with citations and the two processing tiers: [Documents](/guides/file-types/documents).

| Extension       | Type | What you get                                                                                                                                                               |
| --------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.pdf`          | PDF  | Text chunks labeled by layout role (`body`, `table`, `heading`, `figure`, and more), each with a page range. See [Advanced Search & Relations](/guides/advanced-querying). |
| `.docx`, `.doc` | Word | Text chunks with a page range (`metadata.pageStart`/`pageEnd`).                                                                                                            |

## Sheets

How workbooks become row bands with provenance: [Sheets](/guides/file-types/sheets).

| Extension       | Type         | What you get                                                                                                                                                              |
| --------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.xlsx`, `.xls` | Excel        | Structure-aware chunks with row/column provenance (`sheetName`, `rowStart`/`rowEnd`, `colStart`/`colEnd`, `columns`). See [Multimodal Search](/guides/multimodal-search). |
| `.csv`, `.tsv`  | Tabular text | Same row/column provenance as Excel.                                                                                                                                      |

## Text and code

Chunking, JSON parsing scripts and the raw text route: [Text and Code](/guides/file-types/text-and-code).

Every extension in this section is read as plain text and split into text chunks with a
page range. There is no syntax-aware parsing: a `.py` file and a `.txt` file go through the
same lane. For `.json` files, pass a `parsing_script` to control chunking.

| Family                      | Extensions                                                                                                                                                                                                                                          |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Plain text and data         | `.txt`, `.md`, `.json`, `.yaml`, `.yml`                                                                                                                                                                                                             |
| Python                      | `.py`, `.pyi`, `.pyw`, `.ipynb`                                                                                                                                                                                                                     |
| JavaScript and TypeScript   | `.js`, `.mjs`, `.cjs`, `.jsx`, `.ts`, `.tsx`, `.mts`, `.cts`, `.coffee`                                                                                                                                                                             |
| JVM                         | `.java`, `.kt`, `.kts`, `.scala`, `.sbt`, `.groovy`, `.gradle`, `.clj`, `.cljs`, `.edn`                                                                                                                                                             |
| C family                    | `.c`, `.h`, `.cpp`, `.cc`, `.cxx`, `.hpp`, `.hxx`, `.hh`, `.m`, `.mm`                                                                                                                                                                               |
| .NET                        | `.cs`, `.csx`, `.fs`, `.fsx`, `.razor`, `.cshtml`                                                                                                                                                                                                   |
| Other languages             | `.go`, `.rs`, `.rb`, `.erb`, `.rake`, `.gemspec`, `.php`, `.phtml`, `.swift`, `.pl`, `.pm`, `.lua`, `.r`, `.rmd`, `.dart`, `.jl`, `.nim`, `.zig`, `.ex`, `.exs`, `.erl`, `.hrl`, `.hs`, `.elm`, `.ml`, `.mli`, `.s`, `.asm`, `.vbs`, `.applescript` |
| SQL                         | `.sql`, `.ddl`                                                                                                                                                                                                                                      |
| Shell and scripts           | `.sh`, `.bash`, `.zsh`, `.fish`, `.ksh`, `.csh`, `.tcsh`, `.ps1`, `.psm1`, `.psd1`, `.bat`, `.cmd`                                                                                                                                                  |
| Web, markup, and templates  | `.html`, `.htm`, `.xhtml`, `.shtml`, `.css`, `.scss`, `.sass`, `.less`, `.styl`, `.vue`, `.svelte`, `.astro`, `.hbs`, `.ejs`, `.pug`, `.twig`, `.liquid`, `.njk`, `.mustache`                                                                       |
| Markdown and docs           | `.markdown`, `.mdown`, `.mdx`, `.rst`, `.adoc`, `.asciidoc`, `.org`, `.tex`, `.bib`, `.textile`, `.text`, `.diff`, `.patch`                                                                                                                         |
| Config and infra            | `.toml`, `.ini`, `.cfg`, `.conf`, `.properties`, `.lock`, `.tf`, `.tfvars`, `.hcl`, `.nix`, `.cmake`, `.mk`, `.bzl`, `.bazel`, `.dockerfile`, `.log`                                                                                                |
| JSON variants and data text | `.json5`, `.jsonc`, `.jsonl`, `.ndjson`, `.geojson`, `.graphql`, `.gql`, `.proto`                                                                                                                                                                   |
| XML family                  | `.xml`, `.xsl`, `.xslt`, `.xsd`, `.dtd`, `.rss`, `.atom`, `.xaml`, `.svg`, `.drawio`, `.csproj`, `.sln`                                                                                                                                             |

Not indexed, by design: compiled or binary variants (`.pyc`, `.pyo`, `.class`, `.o`,
`.so`, `.dll`, `.wasm`, `.jar`, `.svgz`), `.plist` (often binary), and secret-bearing files
(`.env`, `.pem`, `.key`, `.crt`).

Files with no extension arriving through a cloud storage connector are not rejected up
front. The indexer sniffs their content type (HTTP content type plus magic bytes) and
indexes them when the content is a supported type.

## Images

What an image becomes and how `mask_pii` treats it: [Images](/guides/file-types/images).

| Extension                                                 | Type          | What you get                                                                                                                                                                |
| --------------------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.png`, `.jpg`, `.jpeg`, `.gif`, `.bmp`, `.tiff`, `.webp` | Raster images | One chunk per image: a native embedding of the pixels plus a written description stored as searchable text, so a query matches what the image shows, not just its filename. |

Images are supported up to 200 megapixels decoded, and can run through `mask_pii` for
OCR-based redaction. See [PII Masking](/guides/pii-masking).

## Video

Clips, transcripts and descriptions: [Video](/guides/file-types/video).

| Extension                                               | Type  | What you get                                                                                                                                                                                |
| ------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.mp4`, `.mov`, `.avi`, `.mkv`, `.webm`, `.flv`, `.wmv` | Video | Segmented into clips up to 120s. Each clip has a native embedding plus a transcript and a visual description stored as searchable text. Segment time range in `metadata.startSec`/`endSec`. |

## Audio

Clips and transcripts for audio files: [Audio](/guides/file-types/audio).

| Extension                                               | Type  | What you get                                                                                                                                                                        |
| ------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.mp3`, `.wav`, `.aac`, `.flac`, `.m4a`, `.ogg`, `.wma` | Audio | Segmented into clips up to 80s. Each clip has a native embedding plus a transcript and a description stored as searchable text. Segment time range in `metadata.startSec`/`endSec`. |

Video and audio detail, including transcript language control, lives on
[Multimodal Search](/guides/multimodal-search).

## Email

Parts, relations and metadata in full: [Email](/guides/file-types/email).

| Extension      | Type                      | What you get                                                                                                                                                                                                                                                                                         |
| -------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.msg`, `.eml` | Outlook / RFC 822 message | The message body as a text document plus one document per attachment, each parsed as its own type. `email_attachment` relations link the body to its attachments and `email_reply_to` links a reply to its parent, in both directions. See [Advanced Search & Relations](/guides/advanced-querying). |

Every part carries these filterable metadata keys (empty string when the header is absent):

| Key                                             | On          | Value                                                                   |
| ----------------------------------------------- | ----------- | ----------------------------------------------------------------------- |
| `email_role`                                    | all         | `body` or `attachment`                                                  |
| `email_message_id`, `email_in_reply_to`         | all / body  | `Message-ID` without angle brackets                                     |
| `email_thread_id`                               | all         | `Message-ID` at the root of the reply chain, shared by the whole thread |
| `email_from`, `email_subject`, `email_date`     | all         | Headers as sent; date as ISO 8601 UTC                                   |
| `email_source_uri`                              | all         | The email file's own URI (`s3://…`, `gs://…`, blob URL, `dropbox://…`)  |
| `email_parent_identity`                         | attachments | The body's identity, `msg://<Message-ID>`                               |
| `email_attachment_name`, `email_content_sha256` | attachments | File name; SHA-256 of the bytes                                         |
| `email_attachment_count`                        | body        | Attachments indexed from the message                                    |

Not indexed: inline signature images, empty or duplicate attachments, and unsupported types.
Re-indexing an email replaces its parts in place and removes attachments no longer present.

```json
{ "query": "unit price", "filter": { "email_thread_id": { "$eq": "quote-2026-09-01@example.com" } } }
```

## Size limits by type

Each type has its own per-file and per-request ceiling, and the ceiling also depends on
how the file reaches Captain (dashboard, API, or a connector). See
[File Size Limits](/guides/file-size-limits) for the full breakdown.