Scraper Site API Documentation

Scraper Site API

The Scraper site API is designed to offer a simple REST API to scrape web pages on a large scale without the need for programmatic interaction with geographic locations, IP blocks. The API supports a series of basic features for web scrapings, such as JavaScript rendering, custom HTTP headers, different geographic targets, POST/PUT requests, and an option to use in place of data center proxies.

In this documentation you will find detailed usage guides and code examples in different programming languages that will help you get up and running in the shortest time possible. If the articles below leave any questions unanswered, please feel free to contact our technical support team.

Parameters

Parameters Details
API Key You need an API key to API our database. Your API Key is the unique key that is passed into the API base URL's api_key=YOUR_API_KEY parameter to authenticate with the scraper web API.
URL Specify the URL of the web page you want to scrape, simply set it url=https%3A%2F%2Fscrapersite.com%2F please set URL to encode form.
Render (Optional) If you are crawling a page that requires you to render JavaScript on the page, we can fetch these pages using a headless browser. To render JavaScript, just set render=true and we'll use the Google Chrome instance without a header to fetch the page.
Wait Time (Optional) Some heavy websites need little time to "render" completely. If you need to scrape to wait before it returns the entire rendered HTML, you can use the wait_time=200 parameter in milliseconds between from 200 to 6000.

Default: 200
Example: 1sec = wait_time=1000
Country (Optional) Select a two-letter code for the country you want us as proxy geography for your scraping API request. Supported countries differ to the type of proxy, just assign country=us.

Default: none
List:
  • CH (Switzerland)
  • DE (Germany)
  • ES (Spain)
  • FI (Finland)
  • FR (France)
  • GB (United Kingdom)
  • HU (Hungary)
  • IE (Ireland)
  • IL (Israel)
  • IT (Italy)
  • MX (Mexico)
  • NL (Netherlands)
  • PL (Poland)
  • RS (Serbia)
  • RU (Russia)
  • SE (Sweden)
  • US (United States)
Note: All parameters are case sensitive, Please specify parameters in lower case (small alphabets).

Get Started

API Access Key
You need an access key in order to access our database. Your access Key is the unique key that is passed into the API base URL's api_key parameter in order to authenticate with the Scaper API.

Sample API:

https://scrapersite.com/api-v1?api_key=YOUR_API_KEY&url=https%3A%2F%2Fscrapersite.com%2F
Sign up for a free using the button below to use the our Quick start tool.
Signup

API Response

Example Response:
{ 
  "status": true,
  "code": 200,
  "msg": "Successfully",
  "response": "<!DOCTYPE html><html>... and more"
}

Sample Code PHP (GET Request)

$user_api_key = "YOUR_API_KEY"; // Your API access key, Signup to get API KEY 
$url = urlencode("https://scrapersite.com/");

// Enter your API URL below
$api_url = "https://scrapersite.com/api-v1?api_key=".$user_api_key."&url=".$url;

// Initialize CURL:
$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch); // Store the data
curl_close($ch);

$data = json_decode($json, true); // convert JSON into Array
echo $data['response'];

Sample Code PHP (POST Request)

$user_api_key = "YOUR_API_KEY"; // Your API key, Signup to get API KEY 
$url = urlencode("https://scrapersite.com/");

// Enter your API URL below
$api_url = "https://scrapersite.com/api-v1";
$post_data = "api_key=".$user_api_key."&url=".$url;

// Initialize CURL:
$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
$json = curl_exec($ch); // Store the data
curl_close($ch);

$data = json_decode($json, true); // convert JSON into Array
echo $data['response'];

Errors

There are multiple errors that help you to understand issue with your API response.

Code Details
200 Your API is working. Response successfully
212 Access block for you, You have reached maximum 5 limit per minute hits, please stop extra hits. Restriction remove after 1 minute.
101 You have not supplied a valid API_KEY.
102 Your account is not active, Please check your email to activate it.
103 Your account is suspend for some resons, Please contact us, to activate it.
104 Sorry, api key parameter missing.
105 Sorry, your country code is wrong.
106 Please set URL link.