For the complete documentation index, see llms.txt. This page is also available as Markdown.

Multi-format Output

See how to get more than one output format with a single API call.

You can get multiple result types in a single API response. This feature works the same way with Realtime and Push-Pull integration methods.

Available result types

Output type
Description

png

The PNG screenshot of a web page.

parsed

Parsed content of the web page, formatted as a JSON data structure.

markdown

Markdown of a web page.

xhr

XHR requests made while loading the page.

raw

The raw content found at a given URL. It's likely to be (but won’t always be) an HTML document.

Step 1: Specify result types to be available for fetching

Start by enabling the result types in your initial request payload to make them available. The example uses a source with a Dedicated parser. For a page without one, parse: true needs Custom parser instructions instead.

Sample POST https://data.oxylabs.io/v1/queries payload:

{
    "source": "amazon_product",
    "query": "B07FZ8S74R",
    "parse": true,
    "markdown": true,
    "xhr": true,
    "render": "png"
}

Set only the result types you want to retrieve.

Step 2: Retrieve multiple result types

Then, specify which types to retrieve using the type URL parameter when fetching results. For example:

  • type=parsed,png will return parsed results and the PNG screenshot

  • type=parsed,markdown,xhr,png,raw will return all result types

Realtime omits a requested type that was not enabled, while the Push-Pull /results endpoint returns it with an empty content string.

Realtime API endpoint:

Push-Pull API endpoint:

Output sample

The API will return all requested types together in a single results[] array. The order of the entries is not fixed (Realtime and Push-Pull return them in different orders):

Last updated

Was this helpful?