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

> ## Agent Instructions
> getclean's own MCP server is at https://mcp.getclean.ai/mcp. The /mcp path of this docs site is Mintlify's search over these pages, not getclean.
> Every answer of the API opens with outcome. A page that could not be read is a record whose outcome says why, never an HTTP error; read outcome before anything else.
> The API's contract is the OpenAPI 3.1 file at https://docs.getclean.ai/openapi.yaml; the SDKs are generated from it.
> The product's name is written getclean, in lower case.

# Keep proof of what a page showed

> Fetch a page with the bytes its server sent and a picture of the whole page, each with a digest. With the record's time and fingerprint, they show later what the page said on the day you read it.

An authority fines a shop for a false discount and loses in court, because nobody can show what the price page said 3 weeks before. A page changes or goes away. A report, an audit, or a dispute needs what the page showed on one day. A fetch can return 2 things made for that: the bytes exactly as the server sent them, and a picture of the whole page.

## Ask for the served bytes with a picture

Add `raw_html` and `screenshot` to `formats`.

```bash cURL theme={"theme":"css-variables"}
curl https://api.getclean.ai/v1/contents \
  --header "Authorization: Bearer $GETCLEAN_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "url": "SOURCE_URL",
    "formats": ["markdown", "raw_html", "screenshot"]
  }'
```

```python Python theme={"theme":"css-variables"}
from getclean import GetClean

client = GetClean()

record = client.fetch_contents(
    url="SOURCE_URL",
    formats=["markdown", "raw_html", "screenshot"],
)
```

```typescript TypeScript theme={"theme":"css-variables"}
import { GetClean } from "getclean";

const client = new GetClean();

const record = await client.fetchContents({
    url: "SOURCE_URL",
    formats: ["markdown", "raw_html", "screenshot"],
});
```

Replace `SOURCE_URL` with the address of the page.

The response has both, each with a digest, which is a hash of its bytes. This response is cut to the fields that this page explains, and the 2 files are cut to their facts.

```json 201 Created theme={"theme":"css-variables"}
{
  "fetched_at": "2026-11-04T08:40:12Z",
  "fingerprint": "sha-256=:kw4QGoYGxOYpZ0EZGL+nxMfFUXfrxcp+P0M4EOrEiH4=:",
  "raw_html": {
    "digest": "sha-256=:7HqC7GihbMvNe0QRGihXoSzWNR2cLpquMihXOseZoSw=:",
    "bytes": 48213,
    "media_type": "text/html; charset=utf-8"
  },
  "screenshot": {
    "digest": "sha-256=:Rt11HNu+jiwX5K846APgS7Sri/ToHiTmp+MxA8fDhrM=:",
    "width_px": 1280,
    "height_px": 5120
  },
  "source": {
    "final_url": "https://example.com/q3",
    "status_code": 200,
    "visitor": { "country": "DE", "language": "de-DE,de;q=0.9", "network": "datacenter" }
  }
}
```

Each of the 2 files also has a `url`, where the file can be downloaded for as long as the record is stored.

## Know what each part shows

A record has these parts of proof.

| Part | What it is |
| - | - |
| `raw_html` | The bytes of the page as the server sent them, before any script ran, with their digest, their size, and the media type sent. |
| `screenshot` | A picture of the whole page as PNG, with its digest. |
| `fingerprint` | A hash of the content that the record returned, which anyone who has that text can compute. |
| `fetched_at` | The time the fetch started. |
| `source.final_url` and `source.redirects` | The address the fetch ended at, and every step on the way to it. |
| `source.visitor` | The country the page was read from, the language asked for, and the kind of network. |

These parts have 3 limits.

* The time is the time of getclean's own clock, and no outside service signs it. If a dispute can turn on the time, send the digests to a time-stamping service of your choice on the day of the fetch.
* The picture is taken on a second visit to the page, so a site can show that visit another page than the one whose text was read.
* A copy from an archive has the bytes as the archive served them, and no picture. A document has neither. Its `source.document_digest` is the hash of the file itself.

## Store the files yourself

A record is stored for 48 hours after its last use and for at most 30 days, and a dispute can come after a year. Download the 2 files while the record is stored, and store them with their digests, the fingerprint, and the time. Anyone can then hash the files again and compare.

A fetch that sends `retention` as `none` stores nothing. The 2 files then come inside the response, as base64.

## Record a page that a person saved

A page behind a sign-in cannot be fetched by its address. A person can open it, save it, and send the file to `upload_contents`, with the page's address as `captured_url` and the time it was saved as `captured_at`. The record then has both, as you stated them, and the hash of the file.

A saved page is read from its bytes alone. Nothing it points to is loaded, so its content can differ from what the person saw, and no picture is made.

## Check what proof costs

`raw_html` adds nothing to the cost of a fetch. A picture costs one screenshot unit. If the picture cannot be made within the time or the spending limit of the call, a notice says so, and the record still comes.


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