HTML Scraper API for public web pages

HTML Scraper API for public web pages

HTML Scraper API for public web pages

Parse HTML pages by walking nested selectors and receive the trimmed fragment as JSON.

HTML Scraper API

Call https://api.mihajlo.mk/v1/scrape with your token, the target page, and the nested rules that describe the node you want to inspect.

Parameters

  • token — copy the token (API Key) from your https://mihajlo.mk account after signing in with Google/Gmail.
  • url — the absolute https:// or http:// address of the HTML page to parse.
  • rules — comma separated selectors like tag|attribute=value:index. Each part drills down one level.

The selector format supports attribute filters (class, data-*, etc) and a zero-based index so you can pick the correct occurrence.

https://api.mihajlo.mk/v1/scrape?token=YOUR_TOKEN&rules=div|class=article-info:0,h1|class=specs-phone-name-title:0&url=https://www.gsmarena.com/samsung_galaxy_s10_5g-9588.php

Sample 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"
  }
}

The JSON payload always exposes tag, the attribute map, and trimmed text of the matched node.