---
title: "Estimate a run's cost, without running it"
method: POST
path: "/v1/actors/{slug}/estimate"
tags: ["actors"]
---

# Estimate a run's cost, without running it

`POST /v1/actors/{slug}/estimate`

## Request

- Base URL: `https://barchin.net/api`
- URL: `https://barchin.net/api/v1/actors/{slug}/estimate`
- Auth: HTTP bearer

A dry run of the billing: validate the input exactly as a run would, ask the actor
how many pages it can open for it, and price that on every pool the actor may use.

Nothing is created or reserved. The dashboard calls this as the customer edits the
form so the reservation they are about to make is never a surprise; an API caller
can use it to size a batch before spending on it.

## Path parameters

- `slug` string, required

## Request body

- ActorRunCreateIn: Free-form actor input; the actor's runner validates it (extra keys allowed).
  - `url` string, nullable

## Response `200`

Successful Response

- ActorRunEstimateOut: What a run of this input would reserve, before anything is charged. The same arithmetic the run is held and billed by, so the number shown under the form is the number that lands on the bill. A dry run: nothing is created.
  - `actor_slug` string, required
  - `base_credits` integer, required
  - `page_budget` integer, required
  - `js_enabled` boolean, required
  - `pools` ActorEstimatePoolOut[], required
    - `proxy` 'datacenter' | 'residential' | 'unblocker', required: The public name of a tier; this is what the API accepts and returns.
    - `credits_per_page` integer, required
    - `credits_held` integer, required
  - `auto_hold` integer, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `429`: Too Many Requests

---

[API](https://skmtc.dev/barchin/apis/barchin-scraping-api.md) · [All operations](https://skmtc.dev/barchin/apis/barchin-scraping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/barchin/apis/barchin-scraping-api/revisions/fe97e4690cc3?raw)
