# Read documents as data

> List documents, read their extracted text and typed fields, and map results back to your own files.

Source: https://fryri.com/docs/api/read-documents-as-data

Captured documents are not just retrievable, they are readable as structured data. What Fryri extracts, your code can consume.

## List and read

```bash
curl "https://api.fryri.com/v1/documents" \
  -H "Authorization: Bearer fryri_sk_..."
```

The list includes each document's type, date and your `source_ref` if you sent one. Read one document in full:

```bash
curl "https://api.fryri.com/v1/documents/{file_id}" \
  -H "Authorization: Bearer fryri_sk_..."
```

That returns the extracted text plus the typed record: what kind of document it is, its date, and the fields found inside (amounts, parties, reference numbers). A download route returns the original bytes when they are stored with Fryri.

## Structured facts

`GET /v1/facts` returns the standing facts extracted across the whole library, and `POST`, `PATCH` and `DELETE` let you write and correct them. Use facts when you want durable statements ("the lease ends March 2027") rather than documents.

Both endpoints accept `end_user_id` to read a specific end user's library; see [give your app memory](/docs/api/give-your-app-memory).
