Extraction

Structured Data Extraction

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.

post/extract

Request

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

Request body

urlstring uri required

The URL to process

schemaobject required

JSON schema for extraction

instructionsstring

Natural language extraction hints

Example request

{
  "url": "https://example.com",
  "schema": {
    "title": {
      "type": "string"
    },
    "purpose": {
      "type": "string"
    }
  },
  "instructions": "Extract the page title and what the domain is for"
}

Response

Structured JSON pulled from a page against your schema.

urlstring

Source URL

dataobject

Extracted data matching the provided schema

extractedAtstring

ISO timestamp

requestIdstring

Changes

No recorded changes to this operation across all 1 revision of this API.