# Reproduce our ParseBench 2 result

Run the public ParseBench 2 benchmark against the production API with your own key.

Documentation index: https://webcite.co/llms.txt
Canonical page: https://webcite.co/api-docs/parsebench
API origin: https://api.webcite.co
Authentication: x-api-key header. Keep keys on your server.

## What you need

- A Webcite API key from the [API Keys page](/api-keys).
- Credits for the run. ParseBench 2 has 4,317 test cases, each a single one-page file. Each case is one free upload and one extraction of one page, charged at cost. The headline cost is 3.11 US cents a page, the public Builder-plan price measured on 325 pages weighted to the benchmark's page mix; our full run's billed total, 3,183 credits ($127.33), corresponds to about 2.95 cents a page. One subset is enough for a trial: `headings` has 100 cases and uses about 28 credits.
- Request limits that fit. With the default limits a Builder account can make 2,500 extraction requests a day, so a full run takes two days; an Enterprise account can run it in one. See [limits and timing](/api-docs/extract#limits).
- Git, Python and [uv](https://docs.astral.sh/uv/).

## Install the benchmark

The `webcite` pipeline comes to ParseBench in Webcite's provider pull request. Once that pull request is merged, these commands install it from the standard repository:

```bash
git clone https://github.com/run-llama/ParseBench
cd ParseBench
uv sync
uv run parse-bench pipelines | grep webcite
```

The last command prints the `webcite` pipeline. It calls `POST /api/v1/upload` and `POST /api/v1/extract` and nothing else.

## Set the key and the API address

```bash
export WEBCITE_API_KEY="YOUR_API_KEY"
export WEBCITE_BASE_URL="https://api.webcite.co/api/v1"
```

## Run it

Try one subset first:

```bash
uv run parse-bench run webcite --dataset parsebench-2 --group headings --max_concurrent 4
```

Then the full benchmark:

```bash
uv run parse-bench run webcite --dataset parsebench-2 --max_concurrent 8
```

The first run downloads the dataset to `./data_parsebench-2`. Each raw API response is saved under `output/parsebench-2/<subset>/webcite/`. Keep `--max_concurrent` within your plan's per-minute extraction limit. On a 429 the pipeline waits for the `Retry-After` interval and continues.

If a run stops, for example at the daily limit, start the same command again. Cases that already have a result are not read or charged again.

## Score it

The run command scores the results when the reads finish, as the [ParseBench README](https://github.com/run-llama/ParseBench#readme) describes. The six dimension scores (text, formatting, tables, charts, layout, forms) and the overall score are written to `output/parsebench-2/_score/webcite/_next_score.json`. A dimension is scored when every subset in it has results, so after a one-subset trial the file holds that subset's score in its dimension's `slots`, and the dimension and overall scores follow once the full run is done.

To score saved results again without calling the API:

```bash
uv run parse-bench run webcite --dataset parsebench-2 --skip_inference
```

## Compare with our run

The build that served your requests is public:

```bash
curl https://api.webcite.co/health
```

`build_sha` in the response identifies it. Each saved response also records the `reader.page_type` of every page, so you can see how each page in your run was classified.

Pages are read from their images, so two runs of the same page can differ slightly and scores move by a small amount between runs. A later build can also assign page types to different readers. [How pages are read](/api-docs/page-reading) explains the fields. The [benchmarks page](/benchmarks) has the published score for every dimension.
