Full JSON Response
Have your response organised in a JSON response for easier integration with third party apps.
Last updated
Have your response organised in a JSON response for easier integration with third party apps.
Last updated
The default response body received from the BrowserAPI contains the plain HTML scraped from the targeted URL. This approach is ideal for HTML parsing, however it can be harder to integrate with third party apps that only accept JSON format.
If you want BrowserAPI to organise the response in a JSON format, all you have to do is to add json_response=1
to your request. The format of the response will then be:
Element | Type | Description |
---|---|---|
Your full GET request should then be sent to the following address:
Important! The url
parameter has to be encoded.
( i.e. &url=https%3A%2F%2Fwww.webscrapingapi.com%2F )
headers
Object
key
: value
pair of haders received from the server.
initial-status-code
int
Status code received from the server.
resolved-url
string
URL in case of redirects.
body
string
Scraped content.
type
string
Response type. Can be html
, json
or b64
(for files, images, PDFs etc.)
screenshot
string
base64 encrypted image.
cookies
Array
Array of cookies sent from the server.
xhr
Array
Array of XHR / Ajax requests sent by the browser durring scraping.
metadata
Object
Microdata and JSON-LD extracted from the HTML file.