Search the web with X402 payment
curl --request POST \
--url https://api.hyperbrowser.ai/x402/web/search \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"page": 123,
"maxAgeSeconds": 123,
"filters": {
"exactPhrase": true,
"semanticPhrase": true,
"excludeTerms": [
"<string>"
],
"boostTerms": [
"<string>"
],
"site": "<string>",
"excludeSite": "<string>",
"intitle": "<string>",
"inurl": "<string>"
}
}
'import requests
url = "https://api.hyperbrowser.ai/x402/web/search"
payload = {
"query": "<string>",
"page": 123,
"maxAgeSeconds": 123,
"filters": {
"exactPhrase": True,
"semanticPhrase": True,
"excludeTerms": ["<string>"],
"boostTerms": ["<string>"],
"site": "<string>",
"excludeSite": "<string>",
"intitle": "<string>",
"inurl": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
page: 123,
maxAgeSeconds: 123,
filters: {
exactPhrase: true,
semanticPhrase: true,
excludeTerms: ['<string>'],
boostTerms: ['<string>'],
site: '<string>',
excludeSite: '<string>',
intitle: '<string>',
inurl: '<string>'
}
})
};
fetch('https://api.hyperbrowser.ai/x402/web/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperbrowser.ai/x402/web/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'page' => 123,
'maxAgeSeconds' => 123,
'filters' => [
'exactPhrase' => true,
'semanticPhrase' => true,
'excludeTerms' => [
'<string>'
],
'boostTerms' => [
'<string>'
],
'site' => '<string>',
'excludeSite' => '<string>',
'intitle' => '<string>',
'inurl' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperbrowser.ai/x402/web/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"page\": 123,\n \"maxAgeSeconds\": 123,\n \"filters\": {\n \"exactPhrase\": true,\n \"semanticPhrase\": true,\n \"excludeTerms\": [\n \"<string>\"\n ],\n \"boostTerms\": [\n \"<string>\"\n ],\n \"site\": \"<string>\",\n \"excludeSite\": \"<string>\",\n \"intitle\": \"<string>\",\n \"inurl\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperbrowser.ai/x402/web/search")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"page\": 123,\n \"maxAgeSeconds\": 123,\n \"filters\": {\n \"exactPhrase\": true,\n \"semanticPhrase\": true,\n \"excludeTerms\": [\n \"<string>\"\n ],\n \"boostTerms\": [\n \"<string>\"\n ],\n \"site\": \"<string>\",\n \"excludeSite\": \"<string>\",\n \"intitle\": \"<string>\",\n \"inurl\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbrowser.ai/x402/web/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"page\": 123,\n \"maxAgeSeconds\": 123,\n \"filters\": {\n \"exactPhrase\": true,\n \"semanticPhrase\": true,\n \"excludeTerms\": [\n \"<string>\"\n ],\n \"boostTerms\": [\n \"<string>\"\n ],\n \"site\": \"<string>\",\n \"excludeSite\": \"<string>\",\n \"intitle\": \"<string>\",\n \"inurl\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"error": "<string>",
"data": {
"query": "<string>",
"results": [
{
"title": "<string>",
"url": "<string>",
"description": "<string>"
}
]
}
}{
"message": "<string>"
}{}{
"message": "<string>"
}X402
Search the web with X402 payment
X402 payment endpoint. First request returns 402 with payment requirements. Retry with PAYMENT-SIGNATURE header containing cryptographic proof to get search results. See https://x402.gitbook.io/x402 for protocol details.
POST
/
x402
/
web
/
search
Search the web with X402 payment
curl --request POST \
--url https://api.hyperbrowser.ai/x402/web/search \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"page": 123,
"maxAgeSeconds": 123,
"filters": {
"exactPhrase": true,
"semanticPhrase": true,
"excludeTerms": [
"<string>"
],
"boostTerms": [
"<string>"
],
"site": "<string>",
"excludeSite": "<string>",
"intitle": "<string>",
"inurl": "<string>"
}
}
'import requests
url = "https://api.hyperbrowser.ai/x402/web/search"
payload = {
"query": "<string>",
"page": 123,
"maxAgeSeconds": 123,
"filters": {
"exactPhrase": True,
"semanticPhrase": True,
"excludeTerms": ["<string>"],
"boostTerms": ["<string>"],
"site": "<string>",
"excludeSite": "<string>",
"intitle": "<string>",
"inurl": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
page: 123,
maxAgeSeconds: 123,
filters: {
exactPhrase: true,
semanticPhrase: true,
excludeTerms: ['<string>'],
boostTerms: ['<string>'],
site: '<string>',
excludeSite: '<string>',
intitle: '<string>',
inurl: '<string>'
}
})
};
fetch('https://api.hyperbrowser.ai/x402/web/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperbrowser.ai/x402/web/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'page' => 123,
'maxAgeSeconds' => 123,
'filters' => [
'exactPhrase' => true,
'semanticPhrase' => true,
'excludeTerms' => [
'<string>'
],
'boostTerms' => [
'<string>'
],
'site' => '<string>',
'excludeSite' => '<string>',
'intitle' => '<string>',
'inurl' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperbrowser.ai/x402/web/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"page\": 123,\n \"maxAgeSeconds\": 123,\n \"filters\": {\n \"exactPhrase\": true,\n \"semanticPhrase\": true,\n \"excludeTerms\": [\n \"<string>\"\n ],\n \"boostTerms\": [\n \"<string>\"\n ],\n \"site\": \"<string>\",\n \"excludeSite\": \"<string>\",\n \"intitle\": \"<string>\",\n \"inurl\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperbrowser.ai/x402/web/search")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"page\": 123,\n \"maxAgeSeconds\": 123,\n \"filters\": {\n \"exactPhrase\": true,\n \"semanticPhrase\": true,\n \"excludeTerms\": [\n \"<string>\"\n ],\n \"boostTerms\": [\n \"<string>\"\n ],\n \"site\": \"<string>\",\n \"excludeSite\": \"<string>\",\n \"intitle\": \"<string>\",\n \"inurl\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbrowser.ai/x402/web/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"page\": 123,\n \"maxAgeSeconds\": 123,\n \"filters\": {\n \"exactPhrase\": true,\n \"semanticPhrase\": true,\n \"excludeTerms\": [\n \"<string>\"\n ],\n \"boostTerms\": [\n \"<string>\"\n ],\n \"site\": \"<string>\",\n \"excludeSite\": \"<string>\",\n \"intitle\": \"<string>\",\n \"inurl\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"error": "<string>",
"data": {
"query": "<string>",
"results": [
{
"title": "<string>",
"url": "<string>",
"description": "<string>"
}
]
}
}{
"message": "<string>"
}{}{
"message": "<string>"
}Headers
Base64-encoded JSON containing payment proof (x402Version, resource, accepted payment method, and cryptographic payload with signature and payer address)
Body
application/json
Was this page helpful?
⌘I