Search the web
Search the web for a query and get back ranked results. By default each result comes back with its page fetched and returned as clean data; set scrapeResults to false for just the ranked titles, urls, and snippets.
curl --request POST \
--url https://api.hydrafetch.com/v1/web/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "best open source vector databases",
"limit": 5,
"scrapeResults": true,
"scrapeOptions": {
"formats": [
"markdown"
],
"onlyMainContent": true,
"includeTags": [
"<string>"
],
"excludeTags": [
"<string>"
],
"removeBase64Images": true,
"blockAds": true,
"includeLinks": true,
"renderJs": true,
"waitFor": 15000,
"timeout": 60500,
"location": {
"country": "us",
"languages": [
"en-US",
"en"
]
},
"headers": {},
"preferStructure": true,
"maxAge": 302400000
},
"engine": "brave",
"timeRange": "week",
"country": "us",
"includeDomains": [
"github.com",
"arxiv.org"
],
"excludeDomains": [
"pinterest.com"
]
}
'import requests
url = "https://api.hydrafetch.com/v1/web/search"
payload = {
"query": "best open source vector databases",
"limit": 5,
"scrapeResults": True,
"scrapeOptions": {
"formats": ["markdown"],
"onlyMainContent": True,
"includeTags": ["<string>"],
"excludeTags": ["<string>"],
"removeBase64Images": True,
"blockAds": True,
"includeLinks": True,
"renderJs": True,
"waitFor": 15000,
"timeout": 60500,
"location": {
"country": "us",
"languages": ["en-US", "en"]
},
"headers": {},
"preferStructure": True,
"maxAge": 302400000
},
"engine": "brave",
"timeRange": "week",
"country": "us",
"includeDomains": ["github.com", "arxiv.org"],
"excludeDomains": ["pinterest.com"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'best open source vector databases',
limit: 5,
scrapeResults: true,
scrapeOptions: {
formats: ['markdown'],
onlyMainContent: true,
includeTags: ['<string>'],
excludeTags: ['<string>'],
removeBase64Images: true,
blockAds: true,
includeLinks: true,
renderJs: true,
waitFor: 15000,
timeout: 60500,
location: {country: 'us', languages: ['en-US', 'en']},
headers: {},
preferStructure: true,
maxAge: 302400000
},
engine: 'brave',
timeRange: 'week',
country: 'us',
includeDomains: ['github.com', 'arxiv.org'],
excludeDomains: ['pinterest.com']
})
};
fetch('https://api.hydrafetch.com/v1/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.hydrafetch.com/v1/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' => 'best open source vector databases',
'limit' => 5,
'scrapeResults' => true,
'scrapeOptions' => [
'formats' => [
'markdown'
],
'onlyMainContent' => true,
'includeTags' => [
'<string>'
],
'excludeTags' => [
'<string>'
],
'removeBase64Images' => true,
'blockAds' => true,
'includeLinks' => true,
'renderJs' => true,
'waitFor' => 15000,
'timeout' => 60500,
'location' => [
'country' => 'us',
'languages' => [
'en-US',
'en'
]
],
'headers' => [
],
'preferStructure' => true,
'maxAge' => 302400000
],
'engine' => 'brave',
'timeRange' => 'week',
'country' => 'us',
'includeDomains' => [
'github.com',
'arxiv.org'
],
'excludeDomains' => [
'pinterest.com'
]
]),
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.hydrafetch.com/v1/web/search"
payload := strings.NewReader("{\n \"query\": \"best open source vector databases\",\n \"limit\": 5,\n \"scrapeResults\": true,\n \"scrapeOptions\": {\n \"formats\": [\n \"markdown\"\n ],\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"includeLinks\": true,\n \"renderJs\": true,\n \"waitFor\": 15000,\n \"timeout\": 60500,\n \"location\": {\n \"country\": \"us\",\n \"languages\": [\n \"en-US\",\n \"en\"\n ]\n },\n \"headers\": {},\n \"preferStructure\": true,\n \"maxAge\": 302400000\n },\n \"engine\": \"brave\",\n \"timeRange\": \"week\",\n \"country\": \"us\",\n \"includeDomains\": [\n \"github.com\",\n \"arxiv.org\"\n ],\n \"excludeDomains\": [\n \"pinterest.com\"\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.hydrafetch.com/v1/web/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"best open source vector databases\",\n \"limit\": 5,\n \"scrapeResults\": true,\n \"scrapeOptions\": {\n \"formats\": [\n \"markdown\"\n ],\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"includeLinks\": true,\n \"renderJs\": true,\n \"waitFor\": 15000,\n \"timeout\": 60500,\n \"location\": {\n \"country\": \"us\",\n \"languages\": [\n \"en-US\",\n \"en\"\n ]\n },\n \"headers\": {},\n \"preferStructure\": true,\n \"maxAge\": 302400000\n },\n \"engine\": \"brave\",\n \"timeRange\": \"week\",\n \"country\": \"us\",\n \"includeDomains\": [\n \"github.com\",\n \"arxiv.org\"\n ],\n \"excludeDomains\": [\n \"pinterest.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hydrafetch.com/v1/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\": \"best open source vector databases\",\n \"limit\": 5,\n \"scrapeResults\": true,\n \"scrapeOptions\": {\n \"formats\": [\n \"markdown\"\n ],\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"includeLinks\": true,\n \"renderJs\": true,\n \"waitFor\": 15000,\n \"timeout\": 60500,\n \"location\": {\n \"country\": \"us\",\n \"languages\": [\n \"en-US\",\n \"en\"\n ]\n },\n \"headers\": {},\n \"preferStructure\": true,\n \"maxAge\": 302400000\n },\n \"engine\": \"brave\",\n \"timeRange\": \"week\",\n \"country\": \"us\",\n \"includeDomains\": [\n \"github.com\",\n \"arxiv.org\"\n ],\n \"excludeDomains\": [\n \"pinterest.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"query": "best open source vector databases",
"engine": "duckduckgo",
"status": "ok",
"results": [
{
"title": "Best open source vector databases",
"url": "https://example.com/vector-databases",
"snippet": "A rundown of the leading open source vector databases and how they compare.",
"rank": 1,
"data": {
"url": "https://example.com",
"finalUrl": "https://example.com/",
"redirected": false,
"status": 200,
"cached": false,
"metadata": {
"title": "Example Domain",
"pageType": "article",
"wordCount": 214,
"description": "A short summary of the page, as published by the page itself.",
"language": "en",
"author": "Jane Doe",
"siteName": "Example Blog",
"publishedTime": "2026-01-05",
"image": "https://example.com/cover.png"
},
"warning": "<string>",
"usage": {
"creditsUsed": 1,
"creditsRemaining": 4999,
"freshness": "fresh"
},
"quality": {
"confidence": 0.94,
"complete": true,
"blocked": false
},
"markdown": "<string>",
"html": "<string>",
"rawHtml": "<string>",
"links": {
"internal": [
"<string>"
],
"external": [
"<string>"
]
},
"structured": {
"entities": [
{
"type": "Product",
"properties": {}
}
],
"jsonLd": [
{}
],
"microdata": [
{}
],
"opengraph": [
{}
],
"rdfa": [
{}
],
"appState": [
"<string>"
]
},
"summary": "<string>",
"json": {}
}
}
]
}
}Authorizations
Body
What to search the web for.
500"best open source vector databases"
How many ranked results to return. Omit for the default.
1 <= x <= 155
When true (default), each result comes back with its page fetched and returned as clean data. When false, you get just the ranked title, url, and snippet.
true
Show child attributes
Show child attributes
Pin the search engine to use. Omit to let us pick the best available one and fall back automatically if it is unavailable — recommended unless you need results from one specific index.
duckduckgo, brave "brave"
Restrict results to a recency window relative to now.
day, week, month, year "week"
ISO 3166 alpha-2 country code to bias results toward a region.
"us"
Only return results from these domains.
15["github.com", "arxiv.org"]
Drop results from these domains.
15["pinterest.com"]
Response
The ranked search results.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.hydrafetch.com/v1/web/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "best open source vector databases",
"limit": 5,
"scrapeResults": true,
"scrapeOptions": {
"formats": [
"markdown"
],
"onlyMainContent": true,
"includeTags": [
"<string>"
],
"excludeTags": [
"<string>"
],
"removeBase64Images": true,
"blockAds": true,
"includeLinks": true,
"renderJs": true,
"waitFor": 15000,
"timeout": 60500,
"location": {
"country": "us",
"languages": [
"en-US",
"en"
]
},
"headers": {},
"preferStructure": true,
"maxAge": 302400000
},
"engine": "brave",
"timeRange": "week",
"country": "us",
"includeDomains": [
"github.com",
"arxiv.org"
],
"excludeDomains": [
"pinterest.com"
]
}
'import requests
url = "https://api.hydrafetch.com/v1/web/search"
payload = {
"query": "best open source vector databases",
"limit": 5,
"scrapeResults": True,
"scrapeOptions": {
"formats": ["markdown"],
"onlyMainContent": True,
"includeTags": ["<string>"],
"excludeTags": ["<string>"],
"removeBase64Images": True,
"blockAds": True,
"includeLinks": True,
"renderJs": True,
"waitFor": 15000,
"timeout": 60500,
"location": {
"country": "us",
"languages": ["en-US", "en"]
},
"headers": {},
"preferStructure": True,
"maxAge": 302400000
},
"engine": "brave",
"timeRange": "week",
"country": "us",
"includeDomains": ["github.com", "arxiv.org"],
"excludeDomains": ["pinterest.com"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'best open source vector databases',
limit: 5,
scrapeResults: true,
scrapeOptions: {
formats: ['markdown'],
onlyMainContent: true,
includeTags: ['<string>'],
excludeTags: ['<string>'],
removeBase64Images: true,
blockAds: true,
includeLinks: true,
renderJs: true,
waitFor: 15000,
timeout: 60500,
location: {country: 'us', languages: ['en-US', 'en']},
headers: {},
preferStructure: true,
maxAge: 302400000
},
engine: 'brave',
timeRange: 'week',
country: 'us',
includeDomains: ['github.com', 'arxiv.org'],
excludeDomains: ['pinterest.com']
})
};
fetch('https://api.hydrafetch.com/v1/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.hydrafetch.com/v1/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' => 'best open source vector databases',
'limit' => 5,
'scrapeResults' => true,
'scrapeOptions' => [
'formats' => [
'markdown'
],
'onlyMainContent' => true,
'includeTags' => [
'<string>'
],
'excludeTags' => [
'<string>'
],
'removeBase64Images' => true,
'blockAds' => true,
'includeLinks' => true,
'renderJs' => true,
'waitFor' => 15000,
'timeout' => 60500,
'location' => [
'country' => 'us',
'languages' => [
'en-US',
'en'
]
],
'headers' => [
],
'preferStructure' => true,
'maxAge' => 302400000
],
'engine' => 'brave',
'timeRange' => 'week',
'country' => 'us',
'includeDomains' => [
'github.com',
'arxiv.org'
],
'excludeDomains' => [
'pinterest.com'
]
]),
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.hydrafetch.com/v1/web/search"
payload := strings.NewReader("{\n \"query\": \"best open source vector databases\",\n \"limit\": 5,\n \"scrapeResults\": true,\n \"scrapeOptions\": {\n \"formats\": [\n \"markdown\"\n ],\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"includeLinks\": true,\n \"renderJs\": true,\n \"waitFor\": 15000,\n \"timeout\": 60500,\n \"location\": {\n \"country\": \"us\",\n \"languages\": [\n \"en-US\",\n \"en\"\n ]\n },\n \"headers\": {},\n \"preferStructure\": true,\n \"maxAge\": 302400000\n },\n \"engine\": \"brave\",\n \"timeRange\": \"week\",\n \"country\": \"us\",\n \"includeDomains\": [\n \"github.com\",\n \"arxiv.org\"\n ],\n \"excludeDomains\": [\n \"pinterest.com\"\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.hydrafetch.com/v1/web/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"best open source vector databases\",\n \"limit\": 5,\n \"scrapeResults\": true,\n \"scrapeOptions\": {\n \"formats\": [\n \"markdown\"\n ],\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"includeLinks\": true,\n \"renderJs\": true,\n \"waitFor\": 15000,\n \"timeout\": 60500,\n \"location\": {\n \"country\": \"us\",\n \"languages\": [\n \"en-US\",\n \"en\"\n ]\n },\n \"headers\": {},\n \"preferStructure\": true,\n \"maxAge\": 302400000\n },\n \"engine\": \"brave\",\n \"timeRange\": \"week\",\n \"country\": \"us\",\n \"includeDomains\": [\n \"github.com\",\n \"arxiv.org\"\n ],\n \"excludeDomains\": [\n \"pinterest.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hydrafetch.com/v1/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\": \"best open source vector databases\",\n \"limit\": 5,\n \"scrapeResults\": true,\n \"scrapeOptions\": {\n \"formats\": [\n \"markdown\"\n ],\n \"onlyMainContent\": true,\n \"includeTags\": [\n \"<string>\"\n ],\n \"excludeTags\": [\n \"<string>\"\n ],\n \"removeBase64Images\": true,\n \"blockAds\": true,\n \"includeLinks\": true,\n \"renderJs\": true,\n \"waitFor\": 15000,\n \"timeout\": 60500,\n \"location\": {\n \"country\": \"us\",\n \"languages\": [\n \"en-US\",\n \"en\"\n ]\n },\n \"headers\": {},\n \"preferStructure\": true,\n \"maxAge\": 302400000\n },\n \"engine\": \"brave\",\n \"timeRange\": \"week\",\n \"country\": \"us\",\n \"includeDomains\": [\n \"github.com\",\n \"arxiv.org\"\n ],\n \"excludeDomains\": [\n \"pinterest.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"query": "best open source vector databases",
"engine": "duckduckgo",
"status": "ok",
"results": [
{
"title": "Best open source vector databases",
"url": "https://example.com/vector-databases",
"snippet": "A rundown of the leading open source vector databases and how they compare.",
"rank": 1,
"data": {
"url": "https://example.com",
"finalUrl": "https://example.com/",
"redirected": false,
"status": 200,
"cached": false,
"metadata": {
"title": "Example Domain",
"pageType": "article",
"wordCount": 214,
"description": "A short summary of the page, as published by the page itself.",
"language": "en",
"author": "Jane Doe",
"siteName": "Example Blog",
"publishedTime": "2026-01-05",
"image": "https://example.com/cover.png"
},
"warning": "<string>",
"usage": {
"creditsUsed": 1,
"creditsRemaining": 4999,
"freshness": "fresh"
},
"quality": {
"confidence": 0.94,
"complete": true,
"blocked": false
},
"markdown": "<string>",
"html": "<string>",
"rawHtml": "<string>",
"links": {
"internal": [
"<string>"
],
"external": [
"<string>"
]
},
"structured": {
"entities": [
{
"type": "Product",
"properties": {}
}
],
"jsonLd": [
{}
],
"microdata": [
{}
],
"opengraph": [
{}
],
"rdfa": [
{}
],
"appState": [
"<string>"
]
},
"summary": "<string>",
"json": {}
}
}
]
}
}