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

# Sandbox and testing

> Test ScrapeBadger without side effects - dry-run any call with /v1/quote, use a sandboxed trial key, and limit a test key to one API, one IP and an expiry date.

ScrapeBadger has no separate sandbox host. You test against the production API, and these tools keep a test from costing much or changing anything:

| Need | Use | Cost |
| - | - | - |
| Check a call without running it | [Dry run with `POST /v1/quote`](#dry-run-a-call) | Free |
| A throwaway key for an agent | [Trial key](#sandboxed-trial-key) (no account, read APIs only) | Free, 50 credits |
| A safe key for your test suite | [Restricted test key](#a-restricted-test-key) | Normal prices |
| Retries that can't double-bill | [Idempotency keys](https://docs.scrapebadger.com/long-running-requests.md#resend-safely-with-an-idempotency-key) | Free |

## Scraping calls have no side effects

Every scraping endpoint only reads public web data. Calling it changes nothing on the target site or in your account, apart from the credits it uses. Failed, blocked and empty results are not billed.

Only these endpoints change account state:

* Twitter stream monitors, filter rules and webhooks (`/v1/twitter/stream/...`): create, update and delete.
* Webhook secret rotation (`POST /v1/account/webhook-secret/rotate`).

Test those with a key you can throw away, and delete what your test creates.

## Dry run a call

`POST /v1/quote` checks a call and prices it without running it. It is free. Like every `/v1` call, it holds one of your [concurrency](https://docs.scrapebadger.com/concurrency.md) slots while it runs.

```bash theme={null}
curl -s https://scrapebadger.com/v1/quote \
  -H "X-API-Key: $SCRAPEBADGER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method": "GET", "path": "/v1/google/search", "params": {"q": "web scraping api"}}'
```

The response tells you whether the parameters are valid (`valid`, with each bad field in `errors`), what the call would cost (`credits`, `usd`) and how long it usually takes (`latency`). Over MCP, the `quote_call` tool does the same. See [AI Agents](https://docs.scrapebadger.com/ai-agents.md#quote-a-call-before-running-it).

## Sandboxed trial key

An agent can mint a trial key without an account. The key is sandboxed:

* 50 credits, expires after 7 days;
* read APIs only: no Web Scraping API, AI assistants, or stream monitors;
* one call at a time, and only from the IP that minted it.

Mint one with `scrapebadger trial`, or over HTTP as described in [Get a key without copying one](https://docs.scrapebadger.com/ai-agents.md#trial-keys-no-account) and [`auth.md`](https://scrapebadger.com/auth.md). A human can later claim it into their account.

## A restricted test key

For a test suite or CI, create a separate key in the [dashboard](https://scrapebadger.com/api-keys) and restrict it:

* **API permissions:** allow only the APIs the tests call. A call to any other API gets `403 insufficient_scope` and is not billed. See [API key permissions](https://docs.scrapebadger.com/authentication.md#api-key-permissions).
* **IP restrictions:** allow only your CI runners' addresses. See [IP restrictions](https://docs.scrapebadger.com/authentication.md#ip-restrictions).
* **Expiry date:** let the key stop working on its own after the test period.

Every account starts with 1,000 free credits, enough for a few hundred test calls on most APIs.

## Test webhooks

Point `callback_url` (or `X-Callback-URL`) at a request inspector you control, run an [async call](https://docs.scrapebadger.com/long-running-requests.md), and check the delivery and its signature. `GET /v1/account/webhook-deliveries` lists recent attempts with their status codes.


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