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

Free-text search query.

Required string length: 1 - 1000

Response

OK — ranked web search results.

results
object[]
required