Scraprr

An http api to procure html from any webpage as json.

Query Parameters

urlurl of the webpage
selectorcss selector of the element required
idid of the element required (id is given precendence over selector)
nnumber of elements you want to select
Specifying url is necessary. Don't specify selector when you need whole html.

Example 1

request:


    curl "https://scraprr.xyz/api?url=https://google.com&selector=title&selector=meta&n=2"      
        

response:


    [{"text":"Google","attributes":{},"tagname":"title"},{"text":"","attributes":{"content":"Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.","name":"description"},"tagname":"meta"}]      
        

Example 2

request:


    curl "scraprr.xyz/api?url=https://en.wikipedia.org/wiki/Web_scraping&selector=title"    
        

response:


    [{"text":"Web scraping - Wikipedia","attributes":{},"tagname":"title"}]