@skynetxbt/plugin-hyperbrowser
TypeScript icon, indicating that this package has built-in type declarations

1.3.6 • Public • Published

Hyperbrowser Plugin for SkynetXBT

This plugin integrates the Hyperbrowser API with the SkynetXBT framework, allowing for advanced headless browser operations in your applications.

Features

  • Create and manage browser sessions with advanced anti-detection capabilities
  • Scrape web content with customizable options
  • Batch scrape multiple URLs
  • Crawl websites recursively
  • Extract structured data using AI models
  • Use browser automation with AI agents

Core API Documentation

Session Management

createSession(options: CreateSessionRequest): Promise<any>

Creates a new browser session with anti-detection capabilities.

  • options: Configuration for stealth, proxy, and captcha settings
  • Returns: Session details including ID and status
getSession(id: string): Promise<any>

Retrieves details of an existing session.

  • id: Session identifier
  • Returns: Current session state and configuration
stopSession(id: string): Promise<any>

Terminates an active browser session.

  • id: Session identifier to stop
  • Returns: Operation success status
listSessions(page?: number, status?: 'active' | 'closed' | 'error'): Promise<any>

Lists all browser sessions with optional filtering.

  • page: Page number for pagination
  • status: Filter sessions by their current state
  • Returns: Paginated list of sessions

Scraping Operations

scrape(request: ScrapeRequest): Promise<any>

Performs a single URL scraping operation.

  • request: Configuration including URL and scraping options
  • Returns: Job ID for tracking the scrape operation
batchScrape(request: BatchScrapeRequest): Promise<any>

Initiates scraping of multiple URLs in batch.

  • request: Batch configuration with URLs and options
  • Returns: Batch job ID for tracking

Crawling Operations

crawl(request: CrawlRequest): Promise<any>

Starts a recursive website crawling operation.

  • request: Crawl configuration with start URL and rules
  • Returns: Crawl job ID for tracking
getCrawlJob(id: string, page?: number, batchSize?: number): Promise<any>

Retrieves crawl results with pagination support.

  • id: Crawl job identifier
  • page: Results page number
  • batchSize: Number of results per page
  • Returns: Paginated crawl results

Data Extraction

extract(request: ExtractRequest): Promise<any>

Extracts structured data using AI models.

  • request: Extraction configuration and rules
  • Returns: Extraction job ID
getExtractJob(id: string): Promise<any>

Fetches results of an extraction operation.

  • id: Extract job identifier
  • Returns: Structured extracted data

Browser Automation

browserUse(request: BrowserUseRequest): Promise<any>

Initiates an automated browser task.

  • request: Automation sequence and parameters
  • Returns: Task details and control interface
getBrowserUseTask(id: string): Promise<any>

Gets the current state and results of an automation task.

  • id: Task identifier
  • Returns: Task status and output
stopBrowserUseTask(id: string): Promise<any>

Terminates a running browser automation task.

  • id: Task identifier to stop
  • Returns: Operation success status

Installation

npm install @skynetxbt/plugin-hyperbrowser
# or
yarn add @skynetxbt/plugin-hyperbrowser

Quick Start

import { HyperbrowserPlugin } from '@skynetxbt/plugin-hyperbrowser';

// Initialize with API key
const hyperbrowser = new HyperbrowserPlugin('your-api-key');

// Create a stealth session
const session = await hyperbrowser.createSession({
  useStealth: true,
  useProxy: true,
  proxyCountry: 'US'
});

// Perform a scrape operation
const scrapeJob = await hyperbrowser.scrape({
  url: 'https://example.com',
  sessionId: session.id,
  scrapeOptions: {
    formats: ['html', 'markdown']
  }
});

// Get results
const results = await hyperbrowser.getScrapeJob(scrapeJob.id);

Requirements

  • Hyperbrowser API key (Get one at app.hyperbrowser.ai)
  • Node.js 14+
  • TypeScript 4.5+ (for TypeScript users)

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @skynetxbt/plugin-hyperbrowser

Weekly Downloads

38

Version

1.3.6

License

none

Unpacked Size

43.7 kB

Total Files

12

Last publish

Collaborators

  • mitrasish
  • 0xarpit