Documents & Structured Data · x402 V2

Structured Extract

Use this service when you need this capability: fetches one public HTTPS HTML resource and performs explicit deterministic selector, attribute, metadata, or JSON-LD path extraction.

Price and endpoint

LivePOSTBase USDC

0.02 USDC per call

x402 V2 exact payment on Base mainnet (eip155:8453) using USDC. The HTTP 402 challenge confirms the exact requirements before an authorized payment.

POST https://signalharness.ai/api/agent/services/structured_extract/invoke

Purpose

Fetches one public HTTPS HTML resource and performs explicit deterministic selector, attribute, metadata, or JSON-LD path extraction.

Documented public-source retrieval is bounded by the URL, byte, redirect, and timeout limits below. Source availability can affect execution; review the input schema and returned source metadata.

Inputs

Request fields and validation limits
FieldTypeRequiredLimits
urlstringRequiredPattern: ^https://; Minimum length 9; Maximum length 2048
fieldsarrayRequiredMinimum 1 item(s); Maximum 32 item(s)

Example request body

{
  "url": "https://example.com/",
  "fields": [
    {
      "name": "heading",
      "kind": "text",
      "selector": "h1",
      "all": false
    }
  ]
}
View complete input schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "minProperties": 2,
  "maxProperties": 2,
  "required": [
    "url",
    "fields"
  ],
  "properties": {
    "url": {
      "type": "string",
      "pattern": "^https://",
      "minLength": 9,
      "maxLength": 2048
    },
    "fields": {
      "type": "array",
      "minItems": 1,
      "maxItems": 32,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "minProperties": 2,
        "maxProperties": 7,
        "required": [
          "name",
          "kind"
        ],
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$",
            "minLength": 1,
            "maxLength": 64
          },
          "kind": {
            "type": "string",
            "enum": [
              "text",
              "attribute",
              "metadata",
              "json_ld"
            ],
            "minLength": 4,
            "maxLength": 9
          },
          "selector": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "attribute": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "metadataKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "all": {
            "type": "boolean"
          }
        }
      }
    }
  }
}

Realistic output shape

Illustrative output from the canonical adapter fixture and schema. It is not a completed paid execution or a current live observation.

{
  "sourceUrl": "example00",
  "results": [
    {
      "name": "example",
      "kind": "text",
      "matched": 0,
      "values": [
        "example"
      ]
    }
  ],
  "warnings": [
    "Verify the caller-supplied data before relying on this result."
  ]
}
View complete output schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "minProperties": 3,
  "maxProperties": 3,
  "required": [
    "sourceUrl",
    "results",
    "warnings"
  ],
  "properties": {
    "sourceUrl": {
      "type": "string",
      "minLength": 9,
      "maxLength": 2048
    },
    "results": {
      "type": "array",
      "minItems": 0,
      "maxItems": 32,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "minProperties": 4,
        "maxProperties": 4,
        "required": [
          "name",
          "kind",
          "matched",
          "values"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "kind": {
            "type": "string",
            "enum": [
              "text",
              "attribute",
              "metadata",
              "json_ld"
            ],
            "minLength": 4,
            "maxLength": 9
          },
          "matched": {
            "type": "integer",
            "minimum": 0,
            "maximum": 256
          },
          "values": {
            "type": "array",
            "minItems": 0,
            "maxItems": 256,
            "items": {
              "type": "string",
              "minLength": 0,
              "maxLength": 32768
            }
          }
        }
      }
    },
    "warnings": {
      "type": "array",
      "minItems": 0,
      "maxItems": 32,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1024
      }
    }
  }
}

Execution limits

  • MaxInputBytes: 32768
  • MaxOutputBytes: 1048576
  • MaxConcurrentExecutions: 2
  • MaxArtifacts: 0
  • MaxArtifactBytes: 0
  • RateLimitPerMinute: 20
  • MaxFetchBytes: 2097152
  • MaxDecodedBytes: 4194304
  • FetchTimeoutMs: 10000
  • MaxRedirects: 3

Timeout: 15000 ms. Full schemas are in OpenAPI.

Copyable unpaid request

This schema-valid request returns the canonical HTTP 402 challenge without executing the service. A payment-capable client validates the challenge, signs only with prior authority and budget, and retries the identical body.

curl -i -X POST https://signalharness.ai/api/agent/services/structured_extract/invoke \
  -H "Content-Type: application/json" \
  --data '{"url":"https://example.com/","fields":[{"name":"heading","kind":"text","selector":"h1","all":false}]}'

Continue with the paid-call walkthrough →