HTML scraper API

HTML scraper API / HTML parsing service - documentation


Basic information

Service that parses HTML into JSON structure using xPath selector logic.


Token and service authentication

You need to be logged in user before you can use the service.

We simplified the login / registration in the easiest way possible. Only you need to sign in with your Google / Gmail account to continue. After logging into the token field (below) you will be able to use your personal token on services.

Personal Token

Login to show token!


Using the Service v1.0

Version ({version}): v1.0

Link to the parsing page ({url}): ?url= e.g. ""

Selector ({rules}): ?rules= пр. "div|class=article-info:0,h1|class=specs-phone-name-title:0"

Syntax of rules parameter: tag|attribute=value:index,child_tag|attribute:index


<div class="article-info">


   <h1 class="specs-phone-name-title">Samsung Galaxy S10 5G</h1>


The rules for the HTML above would be: div|class=article-info:0,h1|class=specs-phone-name-title:0

service end-point


Example HTTP/GET request|class=article-info:0,h1|class=specs-phone-name-title:0&url=

Example PHP

$response= json_decode($jsonResponse,true);
echo '<pre>';

Example cUrl

curl -X GET  '|class=article-info:0,h1|class=specs-phone-name-title:0&url=';

Пример Javascript

var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    var response_data=JSON.parse(this.responseText).data;
});"GET", "|class=article-info:0,h1|class=specs-phone-name-title:0&url=");

Пример jQuery / JavaScript







Service response

The answer is always in JSON format

The response from the service is the content of the HTML selector in JSON format.

Example response

    "error": false,
    "status_text": "OK",
    "status_code": 200,
    "data": {
        "tag": "h1",
        "class": "specs-phone-name-title",
        "data-spec": "modelname",
        "text": "Samsung Galaxy S10 5G"