Requesting Multiple Response Formats

Web Scraping API supports retrieving multiple data types in the response

To improve efficiency our API provides a functionality to request multiple formats in a single response.

Supported formats

TypeDescription
rawThe raw response body from the URL, which is usually but not exclusively an HTML document
parsedThe parsed page content, provided in JSON format
markdownMarkdown response
xhrXHR requests captured during page rendering
pngA screenshot of the web page in PNG format

This following table shows available response formats, which are determined by the parameters included in your API request. Keep in mind that not all targets support every parameter, therefore results output can vary.

Parse

XHR

Markdown

Headless

Default output

Results output

true



  • OR html

parsed

html, parsed

true



png

parsed

html, parsed, png

true

true


html

parsed

html, parsed, xhr

true


true

  • OR html

parsed

html, parsed, markdown

true

true

true

html

parsed

html, parsed, xhr, markdown


true


html

xhr

html, xhr


true

true

html

markdown

html, xhr, markdown



true

png

markdown

html, markdown, png




png

png

html, png




  • OR html

html

html

Multi-format response for Real-time (Synchronous) Requests

To receive multi-format response for synchronous requests add ?type= parameter to request URL and specify desired response type, i.e.:

https://scraper-api.decodo.com/v2/scrape?type=raw,xhr

Multi-format response for Asynchronous Requests

To receive multi-format response for asynchronous requests add ?type= parameter to results request URL and specify desired response type, i.e.:

https://scraper-api.decodo.com/v2/task/{task_id}/results?type=raw,xhr


Support

Still can't find an answer? Want to say hi? We take pride in our 24/7 customer support. Alternatively, you can reach us via our support email at [email protected].

Feedback

Something's missing? Request an article!
Got feedback? Let us know how we're doing and what can be improved.