JavaScript
import { Hyperbrowser } from '@hyperbrowser/sdk';
const client = new Hyperbrowser({ apiKey: 'your-api-key' });
const response = await client.web.search({
query: 'hyperbrowser api',
filters: {
site: 'hyperbrowser.ai'
}
});from hyperbrowser import Hyperbrowser
from hyperbrowser.models import WebSearchParams, WebSearchFilters
client = Hyperbrowser(api_key='your-api-key')
response = client.web.search(WebSearchParams(
query='hyperbrowser api',
filters=WebSearchFilters(
site='hyperbrowser.ai'
)
))curl --request POST \
--url https://api.hyperbrowser.ai/api/web/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"query": "<string>",
"page": 123,
"maxAgeSeconds": 123,
"filters": {
"exactPhrase": true,
"semanticPhrase": true,
"excludeTerms": [
"<string>"
],
"boostTerms": [
"<string>"
],
"site": "<string>",
"excludeSite": "<string>",
"intitle": "<string>",
"inurl": "<string>"
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperbrowser.ai/api/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",
"x-api-key: <api-key>"
],
]);
$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/api/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("x-api-key", "<api-key>")
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/api/web/search")
.header("x-api-key", "<api-key>")
.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/api/web/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
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>"
}Web API
Search the web
Performs a web search and returns search results with titles, URLs, and descriptions
POST
/
api
/
web
/
search
JavaScript
import { Hyperbrowser } from '@hyperbrowser/sdk';
const client = new Hyperbrowser({ apiKey: 'your-api-key' });
const response = await client.web.search({
query: 'hyperbrowser api',
filters: {
site: 'hyperbrowser.ai'
}
});from hyperbrowser import Hyperbrowser
from hyperbrowser.models import WebSearchParams, WebSearchFilters
client = Hyperbrowser(api_key='your-api-key')
response = client.web.search(WebSearchParams(
query='hyperbrowser api',
filters=WebSearchFilters(
site='hyperbrowser.ai'
)
))curl --request POST \
--url https://api.hyperbrowser.ai/api/web/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"query": "<string>",
"page": 123,
"maxAgeSeconds": 123,
"filters": {
"exactPhrase": true,
"semanticPhrase": true,
"excludeTerms": [
"<string>"
],
"boostTerms": [
"<string>"
],
"site": "<string>",
"excludeSite": "<string>",
"intitle": "<string>",
"inurl": "<string>"
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperbrowser.ai/api/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",
"x-api-key: <api-key>"
],
]);
$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/api/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("x-api-key", "<api-key>")
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/api/web/search")
.header("x-api-key", "<api-key>")
.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/api/web/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
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>"
}Authorizations
Body
application/json
Was this page helpful?
⌘I