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
Type | Description |
---|---|
raw | The raw response body from the URL, which is usually but not exclusively an HTML document |
parsed | The parsed page content, provided in JSON format |
markdown | Markdown response |
xhr | XHR requests captured during page rendering |
png | A 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 |
---|---|---|---|---|---|
|
| parsed | html, parsed | ||
|
| parsed | html, parsed, png | ||
|
|
| parsed | html, parsed, xhr | |
|
|
| parsed | html, parsed, markdown | |
|
|
|
| parsed | html, parsed, xhr, markdown |
|
| xhr | html, xhr | ||
|
|
| markdown | html, xhr, markdown | |
|
| markdown | html, markdown, png | ||
| png | html, png | |||
| 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].
Updated 1 day ago