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

FieldTypeRequiredWhat it is
urlstringYesURL to scrape
schemaobjectYesJSON schema describing the data to extract

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
urlstringAlways (present in every successful answer)
dataobjectAlways (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
  }'

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