Skip to main content
Search queries the web and returns structured results—titles, URLs, and snippets—ready to use in your application. Combine it with Fetch to retrieve full page content from search results.
For the full API schema, see the Search API Reference.

Quick Start

1

Install the SDK

npm install @hyperbrowser/sdk
2

Search the web

import { Hyperbrowser } from "@hyperbrowser/sdk";
import { config } from "dotenv";

config();

const client = new Hyperbrowser({
  apiKey: process.env.HYPERBROWSER_API_KEY,
});

const result = await client.web.search({
  query: "hyperbrowser browser automation",
});

console.log(result);

Response

The response includes search results with titles, URLs, and snippets:
{
  "jobId": "962372c4-a140-400b-8c26-4ffe21d9fb9c",
  "status": "completed",
  "data": {
    "query": "hyperbrowser browser automation",
    "results": [
      {
        "title": "Hyperbrowser - Browser Automation Platform",
        "url": "https://hyperbrowser.ai",
        "description": "Hyperbrowser provides cloud browsers for AI agents and web scraping..."
      },
      {
        "title": "Getting Started with Hyperbrowser",
        "url": "https://docs.hyperbrowser.ai/quickstart",
        "description": "Learn how to use Hyperbrowser for browser automation..."
      }
    ]
  }
}

Parameters

ParameterTypeRequiredDescription
querystringYesThe search query (max 500 characters)
pagenumberNoPage number for pagination (1-100, default: 1)
maxAgeSecondsnumberNoCache control—cached results older than this are treated as stale. Set to 0 to bypass cache reads.
locationobjectNoLocation hint for localized search results
filtersobjectNoAdvanced search filters

Location Object

FieldTypeRequiredDescription
countrystringYesISO-2 country code (e.g., "US", "GB", "DE")
statestringNoState code (for supported countries)
citystringNoCity name (max 200 characters)

Filters Object

FieldTypeDescription
exactPhrasebooleanWrap query in quotes for exact match
semanticPhrasebooleanUse semantic search
excludeTermsstring[]Terms to exclude from results
boostTermsstring[]Terms to prioritize in results
filetypestringFilter by file type: pdf, doc, docx, xls, xlsx, ppt, pptx, html
sitestringLimit results to a specific site
excludeSitestringExclude results from a specific site
intitlestringSearch term must appear in page title
inurlstringSearch term must appear in URL
exactPhrase and semanticPhrase cannot both be true.

Example with filters

import { Hyperbrowser } from "@hyperbrowser/sdk";
import { config } from "dotenv";

config();

const client = new Hyperbrowser({
  apiKey: process.env.HYPERBROWSER_API_KEY,
});

const result = await client.web.search({
  query: "machine learning tutorials",
  page: 1,
  location: {
    country: "US",
  },
  filters: {
    excludeTerms: ["beginner"],
    filetype: "pdf",
    site: "arxiv.org",
  },
});

X402 Support

For agentic workflows, Hyperbrowser supports x402 payment for the Search API, enabling agents to programmatically pay for browser sessions at request time using USDC, with payment handled inline via HTTP 402 responses. See the X402 Integration page for details.