Skip to main content
POST
/
x402
/
v1
/
web-extract
Web extract
curl --request POST \
  --url https://gateway.sanfoundation.com/x402/v1/web-extract \
  --header 'Content-Type: application/json' \
  --header 'Payment-Signature: <api-key>' \
  --data '
{
  "url": "<string>",
  "objective": "<string>"
}
'
{
  "url": "<string>",
  "title": "<string>",
  "publish_date": "2023-11-07T05:31:56Z",
  "excerpts": [
    "<string>"
  ],
  "full_content": "<string>"
}

Authorizations

Payment-Signature
string
header
required

Base64-encoded signed payment payload as defined by the x402 protocol. Omit on the first attempt to receive the 402 challenge in the PAYMENT-REQUIRED response header; include it on the retry to settle payment and receive the resource.

The legacy header name X-PAYMENT is also accepted by the server for backward compatibility — clients may send either, but Payment-Signature is preferred.

See x402.org for the on-the-wire shape of the PaymentRequired challenge and the settlement receipt returned in the PAYMENT-RESPONSE response header.

Body

application/json
url
string<uri>
required

Absolute http(s) URL to fetch and extract.

objective
string

Optional natural-language objective used to bias the excerpt selection toward the caller's interest.

Maximum string length: 1000

Response

OK — readable content extracted from the URL.

url
string<uri>
required
title
string
required
publish_date
string<date-time> | null
required
excerpts
string[]
required
full_content
string

Full readable text of the page.