Installation

Install ScrapeHub SDKs for your preferred platform

Before You Begin

  • Create a ScrapeHub account at scrapehub.io/signup
  • Generate your API key from the dashboard
  • Choose your preferred programming language

Python Installation

Using pip

Terminal
pip install scrapehub-python

With async support

Terminal
pip install scrapehub-python[async]

Verify Installation

import scrapehub
print(scrapehub.__version__)

Node.js Installation

Using npm

Terminal
npm install @scrapehub/node

Using yarn

Terminal
yarn add @scrapehub/node

Using pnpm

Terminal
pnpm add @scrapehub/node

Verify Installation

const { ScrapeHubClient } = require('@scrapehub/node');
console.log('ScrapeHub SDK loaded successfully');

Ruby Installation

Using gem

Terminal
gem install scrapehub

Using Bundler (Gemfile)

Gemfile
ruby
gem 'scrapehub'
Terminal
bundle install

Go Installation

Terminal
go get github.com/scrapehub/scrapehub-go

Import in your code

main.go
go
package main

import "github.com/scrapehub/scrapehub-go"

PHP Installation

Terminal
composer require scrapehub/scrapehub-php

Autoload

index.php
php
<?php

require 'vendor/autoload.php';

use ScrapeHub\Client;

Using cURL (No Installation)

You can use ScrapeHub directly from the command line without any SDK installation:

Terminal
curl -X POST https://api.scrapehub.io/v4/scrape \ -H "X-API-KEY: your_api_key" \ -H "Content-Type: application/json" \ -d '{"target": "https://example.com"}'

System Requirements

Python

Python 3.7 or higher

Node.js

Node.js 14 or higher

Ruby

Ruby 2.7 or higher

Go

Go 1.18 or higher

PHP

PHP 7.4 or higher