---
title: "Preview extraction (dry run)"
method: POST
path: "/webdbs/preview"
tags: ["webdbs"]
---

# Preview extraction (dry run)

`POST /webdbs/preview`

Tests extraction on up to 5 URLs without creating a collection. Each URL costs 1 credit.

## Request body

- WebdbsPreviewRequest — Tests extraction without creating a collection.
  - `urls` string[], required — URLs to test. Maximum 5.
  - `schema` WebdbsSchema, required — JSON Schema for the fields extracted into each row. Zod users can pass the output of z.toJSONSchema().
  - `eligibility` object — Rules for deciding which pages become rows.
    - `prefilter` object — Fast URL and text checks.
      - `url_match` string[] — URL patterns a page must match. Supports exact URLs, `*`, `**`, and `:name` path values.
      - `must_contain_any` string[] — Text where at least one value must appear.
      - `must_not_contain` string[] — Text values that must not appear.
    - `semantic` object — AI check for whether a page should become a row.
      - `condition` string, required — Plain-language rule a page must satisfy.
      - `min_score` number — Minimum matching score from 0 to 1. Defaults to 0.7.
  - `tags` string[] — Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.

## Response `200`

Per-URL preview results

- WebdbsPreviewResponse — Results from testing WebDB extraction.
  - `results` WebdbsPreviewResult[], required — Preview result for each requested URL.
    - `url` string, required — Requested page URL.
    - `end_url` string, nullable, required — Final URL after redirects.
    - `eligibility` object, nullable, required — Eligibility result for this page.
      - `eligible` boolean, required — Whether the page passed eligibility rules.
      - `score` number, nullable, required — Eligibility score, when available.
      - `reason` string, required — Reason for the eligibility result.
    - `row` object, nullable, required — Extracted row, or null when no row was produced.
    - `fields` object, nullable, required — Extraction details for each field.
    - `extraction` object, nullable, required — Summary of the extraction result.
      - `confidence` number, nullable, required — Overall extraction confidence.
      - `missing_fields` string[], required — Schema fields that were not found.
    - `error` string, nullable, required — Error message, or null when no error occurred.
  - `key_metadata` object — API key usage for this request.
    - `credits_consumed` integer, required — The number of credits consumed by this request.
    - `credits_remaining` integer, required — The number of credits remaining for your organization after this request.

## Other responses

- `400` — Bad request
- `401` — Unauthorized

---

[API](https://skmtc.net/context/apis/context-dev.md) · [All operations](https://skmtc.net/context/apis/context-dev/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/context/context-dev/versions/3c6a01ba967f/schema)
