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

Parser Presets

Find out how parser presets work and how to use them in your scraping jobs.

You can save, reuse, and modify custom parsing instructions through the Web Scraper API. Once you create a parser preset, we'll host it on our system, enabling you to reference it in your scraping jobs via the parser_preset parameter in the payload.

This feature offers several key capabilities:

  • Save and manage your own parsers on our system

  • Easily reuse presets across multiple scraping jobs

  • Create, retrieve, update, delete, and list all presets

  • Access performance and usage statistics of a preset

  • Adapt to changing sites using self-healing presets

API reference

Endpoint: https://data.oxylabs.io/v1/parsers/presets

The table lists each available operation and its endpoint path:

Action
Request Method
Path

Create a preset

POST

/v1/parsers/presets

Retrieve a preset

GET

/v1/parsers/presets/{preset_name}

Update a preset

PUT

/v1/parsers/presets/{preset_name}

Delete a preset

DELETE

/v1/parsers/presets/{preset_name}

List all presets

GET

/v1/parsers/presets

View usage and performance statistics

GET

/v1/parsers/presets/{preset_name}/stats

Track self-healing changes

GET

/v1/parsers/presets/{preset_name}/changelog

Enable self-healing

Parser presets are equipped with the self-healing function, which helps maintain the parsers and their success rates as websites change. When enabled, parser presets automatically repair themselves and adjust parsing instructions in the background with no additional manual input.

To enable self-healing for your custom parser preset, include the following mandatory parameters when creating or updating a preset:

Parameter
Description

self_heal

Turns on the self-healing functionality when set to True.

prompt_schema

A JSON schema describing the required parser output. You can automatically create the schema when generating parsers with API.

urls

A list of up to 5 URLs of the same page type. We recommend providing 3-5 URLs to help the parser adapt to different layouts and improve parsing accuracy.

Payload sample

The payload example shown here enables self-healing by updating an existing preset.

Endpoint: PUT https://data.oxylabs.io/v1/parsers/presets/{preset_name}

Usage examples

Create a preset

Endpoint: POST https://data.oxylabs.io/v1/parsers/presets

Preset names may contain only letters, digits, underscores and hyphens, and must be unique for your account. Creating a preset with an existing name returns 400 - Parser preset already exists.

Payload:

Output

Use a preset

Endpoint: POST https://realtime.oxylabs.io/v1/queries

A newly created preset can take up to about a minute to become available to scraping jobs on both Realtime and Push-Pull. Until then, requests that reference it are rejected with 400 - Provided parser_preset does not exist.

Payload:

Output

Retrieve a preset

Endpoint: GET https://data.oxylabs.io/v1/parsers/presets/{preset_name}

Output

Update a preset

Endpoint: PUT https://data.oxylabs.io/v1/parsers/presets/{preset_name}

Define the fields of the preset you want to update. In the following example, only the parsing_instructions will get updated.

Payload:

Output

Delete a preset

Endpoint: DELETE https://data.oxylabs.io/v1/parsers/presets/{preset_name}

A successful deletion returns 204 No Content. Retrieving the preset afterwards returns 404.

List all presets

Endpoint: GET https://data.oxylabs.io/v1/parsers/presets

Output

View statistics

Endpoint: GET https://data.oxylabs.io/v1/parsers/presets/{preset_name}/stats

Output

You can filter results by date and time using the date_from and/or date_to URL parameters. Use the format YYYY-MM-DDTHH, where T indicates the time, and HH is the hour in a 24-hour format.

For example, to get statistics from 9 AM to 2 PM on August 5, 2025:

Track self-healing changes

Endpoint: GET https://data.oxylabs.io/v1/parsers/presets/{preset_name}/changelog

Our system automatically logs self-healing activity. You can access this historical log to review all modifications made by the self-healing function. A preset that has never been healed returns an empty log:

Last updated

Was this helpful?