---
title: "Structured Data Extraction"
method: POST
path: "/extract"
tags: ["Extraction"]
---

# Structured Data Extraction

`POST /extract`

## Request

- Base URL: `https://api.weblens.dev`
- URL: `https://api.weblens.dev/extract`
- Auth: API key in header `Payment-Signature`

Extract structured data from any webpage using JSON schema. AI-powered extraction that understands page context. Price: $0.03, up to 3x on bot-protected or complex sites.

## Request body

- object
  - `url` string, uri, required: The URL to process
  - `schema` object, required: JSON schema for extraction
  - `instructions` string: Natural language extraction hints

## Response `200`

Structured JSON pulled from a page against your schema.

- object
  - `url` string: Source URL
  - `data` object: Extracted data matching the provided schema
  - `extractedAt` string: ISO timestamp
  - `requestId` string

## Other responses

- `400`: The body failed validation
- `402`: Payment required — x402 v2 protocol. Parse the PAYMENT-REQUIRED response header (base64-encoded JSON), sign the payment with your wallet, then retry the request with the Payment-Signature request header.

---

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