Structured Page Extraction
Pull data from a page into the JSON schema you define. The page is rendered, then AI maps its content to your fields.
Pay by wallet (x402) AI-generated
structured-scrape Example
Input
{
"url": "https://example.com",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
} Answer
{
"url": "https://example.com",
"data": {
"name": null,
"email": null
}
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
url | string | Yes | URL to scrape |
schema | object | Yes | JSON schema describing the data to extract |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
url | string | Always (present in every successful answer) |
data | object | Always (present in every successful answer) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "structured-scrape",
"inputs": {
"url": "https://example.com",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"max_price_cents": 20
}' {
"tool": "strale_execute",
"arguments": {
"slug": "structured-scrape",
"inputs": {
"url": "https://example.com",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
"max_price_cents": 20
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "structured-scrape",
inputs: {
"url": "https://example.com",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
},
max_price_cents: 20,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="structured-scrape",
inputs={
"url": "https://example.com",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
},
"email": {
"type": "string",
},
},
},
},
max_price_cents=20,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i -X POST https://api.strale.io/x402/v2/structured-scrape \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
}
}
}
}' Limitations
Dynamic class names can require selector changes
Requires CSS selectors for extraction — sites with dynamically generated class names (CSS-in-JS) may need adjusted selectors
What to do instead: Use data attributes or semantic HTML tags as selectors instead of class names for sites using CSS-in-JS
Related tools
- Google Search €0.10
- Link Extraction €0.03
- Metadata Extraction €0.03
- URL to Markdown Free
- URL to Text €0.02
- Web Page Screenshot €0.05