Documentation has been updated: see help center and changelog in one place.

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/{parser_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

Payload:

Output

Use a preset

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

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}

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.

Last updated

Was this helpful?