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

# Cost estimation

> Predict what a batch or crawl will cost before you run it.

Before committing to a 10,000-page scrape, you want a credible estimate of how many credits it'll consume. This guide shows you how to produce one.

## The simple formula

```
cost = (number of pages) × (credits per page for the mode)
```

Credits per page:

* `standard`: **1**
* `premium`: **3**

Cache hits are **0** regardless of mode, so if you've scraped a URL recently and it's still within the 24h TTL, that specific page is free.

## Estimating for `standard`

Trivial. If you know the page count, you know the cost.

```
1,000 URLs × 1 credit = 1,000 credits
```

`standard` is the default. Reader will return an error on a blocked page rather than silently charging more.

## Estimating for `premium`

Also trivial, just 3x:

```
1,000 URLs × 3 credits = 3,000 credits
```

Use `premium` only when you know the target site needs it. See [Choosing a proxy mode](/home/guides/advanced/choosing-a-proxy-mode).

## Estimating for a mixed batch

If you have a mix of standard and premium URLs, calculate each group separately:

```
cost = (standard_pages × 1) + (premium_pages × 3)
```

Common cost profiles by site type:

| Target type                                  | Recommended mode | Cost per page |
| -------------------------------------------- | ---------------- | ------------- |
| Blogs, docs, news sites                      | `standard`       | 1             |
| Marketing pages, public APIs                 | `standard`       | 1             |
| E-commerce (general)                         | `standard`       | 1             |
| E-commerce (Amazon, Walmart, etc.)           | `premium`        | 3             |
| LinkedIn, booking sites, aggressive anti-bot | `premium`        | 3             |

## Pilot first

For any batch above a few hundred URLs against unfamiliar sites, run a **pilot** on a representative subset of 50-100 URLs with `standard` mode first. Check success rates and markdown quality:

```ts theme={null}
const pilot = await reader.read({ urls: sampleUrls });
let blocked = 0;
let total = 0;

if (pilot.kind === "job") {
  for (const page of pilot.data.results) {
    if (page.error) continue;
    total += 1;
    // Flag suspiciously thin content as likely blocked
    if ((page.markdown?.length ?? 0) < 500) blocked += 1;
  }
}

const blockRate = blocked / total;
console.log(
  `Block rate: ${(blockRate * 100).toFixed(0)}% - ` +
    `consider premium for these ${blocked} URLs`,
);
```

Now you have a real number grounded in the actual site you're targeting.

## Crawl cost

Crawls charge `crawlPerPage` (flat 1 credit per page discovered) plus the scrape cost per page:

```
crawl cost ≈ (pages discovered) × 1 credit
```

Crawls are single-credit-per-page because they run in a mode optimized for link discovery. The trick with crawls is that `pages discovered` is hard to predict without running the crawl; set `maxPages` as a hard cap so worst-case spend is bounded.

## Reading the bill afterwards

After the run, `/v1/usage/history` shows per-request cost broken down by `proxyMode`. The sum of the `credits` column is your actual spend.

```ts theme={null}
const logs = await reader.request("GET", "/v1/usage/history?limit=100");
const total = logs.data.reduce((sum, entry) => sum + entry.credits, 0);
console.log(`Last 100 requests: ${total} credits`);
```

## Next

* [Credit exhaustion](/home/guides/production/credit-exhaustion)
* [Choosing a proxy mode](/home/guides/advanced/choosing-a-proxy-mode)
