> ## Documentation Index
> Fetch the complete documentation index at: https://jmail.world/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# documents()

> ドキュメントのメタデータと全文をダウンロード

```python theme={null}
client.documents(include_text=False) -> pd.DataFrame
```

ドキュメントのメタデータをダウンロードします。オプションで、すべてのドキュメントから抽出された全文テキストも含められます（シャーディングされたファイルをダウンロードします）。

## パラメータ

**include\_text** `bool` (default: False)

`True` の場合、個々の全文テキストシャードをダウンロードして 1 つの DataFrame に連結します。これによりダウンロード量はかなり大きくなります。

## 返り値

ドキュメントのメタデータを格納した `pd.DataFrame`。任意で `extracted_text` を含みます。

## 例

```python theme={null}
from jmail import JmailClient

client = JmailClient()

# メタデータのみ
docs = client.documents()

# 全文テキストを含む(大容量ダウンロード)
docs_full = client.documents(include_text=True)

# ドキュメント説明を検索
flights = docs[docs.document_description.str.contains("flight", case=False, na=False)]
```

## 列

| 列 | 型 | 説明 |
| - | - | - |
| `id` | int | ドキュメントを一意に識別するID |
| `source` | string | ソース（`doj`、`house_oversight`） |
| `release_batch` | string | 巻・バッチ識別子 |
| `original_filename` | string | 元のファイル名 |
| `page_count` | int | ページ数 |
| `size` | int | ファイルサイズ（バイト単位） |
| `document_description` | string | AI生成の説明文 |
| `has_thumbnail` | bool | サムネイルの有無 |

### 追加列 (include\_text=True)

| Column | Type | 説明 |
| - | - | - |
| `extracted_text` | string | ドキュメントから抽出されたテキスト全文 |

## フルテキスト・シャード

`include_text=True` を使用すると、クライアントはこれらのシャードをダウンロードして連結します。

| シャード | 内容 |
| - | - |
| `VOL00008` | DOJ（米国司法省）第8巻の文書 |
| `VOL00009` | DOJ 第9巻の文書 |
| `VOL00010` | DOJ 第10巻の文書 |
| `DataSet11` | DOJ データセット 11 の文書 |
| `other` | House Oversight、裁判記録など |

## ダイレクト URL

```
https://data.jmail.world/v1/documents.parquet
https://data.jmail.world/v1/documents-full/VOL00008.parquet
https://data.jmail.world/v1/documents-full/VOL00009.parquet
https://data.jmail.world/v1/documents-full/VOL00010.parquet
https://data.jmail.world/v1/documents-full/DataSet11.parquet
https://data.jmail.world/v1/documents-full/other.parquet
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.