LogoLogo
SupportDashboard
  • Community
  • Welcome to Hyperbrowser
  • Get Started
    • Quickstart
      • AI Agents
        • Browser Use
        • Claude Computer Use
        • OpenAI CUA
      • Web Scraping
        • Scrape
        • Crawl
        • Extract
      • Browser Automation
        • Puppeteer
        • Playwright
        • Selenium
  • Agents
    • Browser Use
    • Claude Computer Use
    • OpenAI CUA
  • HyperAgent
    • About HyperAgent
      • HyperAgent SDK
      • HyperAgent Types
  • Quickstart
  • Multi-Page actions
  • Custom Actions
  • MCP Support
    • Tutorial
  • Examples
    • Custom Actions
    • LLM support
    • Cloud Support
      • Setting Up
      • Proxies
      • Profiles
    • MCP Examples
      • Google Sheets
      • Weather
        • Weather Server
    • Output to Schema
  • Web Scraping
    • Scrape
    • Crawl
    • Extract
  • Sessions
    • Overview
      • Session Parameters
    • Advanced Privacy & Anti-Detection
      • Stealth Mode
      • Proxies
      • Static IPs
      • CAPTCHA Solving
      • Ad Blocking
    • Profiles
    • Recordings
    • Live View
    • Extensions
    • Downloads
  • Guides
    • Model Context Protocol
    • Scraping
    • AI Function Calling
    • Extract Information with an LLM
    • Using Hyperbrowser Session
    • CAPTCHA Solving
  • Integrations
    • ⛓️LangChain
    • 🦙LlamaIndex
  • reference
    • Pricing
    • SDKs
      • Node
        • Sessions
        • Profiles
        • Scrape
        • Crawl
        • Extensions
      • Python
        • Sessions
        • Profiles
        • Scrape
        • Crawl
        • Extensions
    • API Reference
      • Sessions
      • Scrape
      • Crawl
      • Extract
      • Agents
        • Browser Use
        • Claude Computer Use
        • OpenAI CUA
      • Profiles
      • Extensions
Powered by GitBook
On this page
  • Start Scrape Job
  • ​Get Scrape Job
  • Start Scrape Job and Wait
  • Types
  • ScrapeFormat
  • ScrapeJobStatus
  • ScrapeOptions
  • StartScrapeJobResponse
  • ScrapeJobData
  • ScrapeJobResponse
Export as PDF
  1. reference
  2. SDKs
  3. Node

Scrape

PreviousProfilesNextCrawl

Last updated 4 months ago

Start Scrape Job

Starts a scrape job for a given URL.

Method: client.scrape.start(params: StartScrapeJobParams): Promise<StartScrapeJobResponse>

Endpoint: POST /api/scrape

Parameters:

  • StartScrapeJobParams:

    • url: string - URL to scrape

    • sessionOptions?:

    • scrapeOptions?:

Response:

Example:

const response = await client.scrape.start({
  url: "https://example.com",
});
console.log(response.jobId);

Get Scrape Job

Retrieves details of a specific scrape job.

Method: client.scrape.get(id: string): Promise<ScrapeJobResponse>

Endpoint: GET /api/scrape/{id}

Parameters:

  • id: string - Scrape job ID

Example:

const response = await client.scrape.get(
  "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
);
console.log(response.status);

Start Scrape Job and Wait

Start a scrape job and wait for it to complete

Method: client.scrape.startAndWait(params: StartScrapeJobParams): Promise<ScrapeJobResponse>

Parameters:

  • StartScrapeJobParams:

    • url: string - URL to scrape

Example:

const response = await client.scrape.startAndWait({
  url: "https://example.com"
});
console.log(response.status);

Types

ScrapeFormat

type ScrapeFormat = "markdown" | "html" | "links" | "screenshot";

ScrapeJobStatus

type ScrapeJobStatus = "pending" | "running" | "completed" | "failed";

ScrapeOptions

interface ScrapeOptions {
  formats?: ScrapeFormat[];
  includeTags?: string[];
  excludeTags?: string[];
  onlyMainContent?: boolean;
  waitFor?: number;
  timeout?: number;
}

StartScrapeJobResponse

interface StartScrapeJobResponse {
  jobId: string;
}

ScrapeJobData

interface ScrapeJobData {
  metadata?: Record<string, string | string[]>;
  markdown?: string;
  html?: string;
  links?: string[];
}

ScrapeJobResponse

interface ScrapeJobResponse {
  jobId: string;
  status: ScrapeJobStatus;
  data?: ScrapeJobData;
  error?: string;
}

Response:

sessionOptions?:

scrapeOptions?:

Response:

ScrapeJobResponse
ScrapeOptions
ScrapeJobResponse
​
ScrapeOptions
StartScrapeJobResponse
CreateSessionParams
CreateSessionParams