Custom Parser
See the steps for a quick start with Oxylabs Custom Parser.
Custom Parser is a free Web Scraper API feature that lets you create parsing and data processing logic that’s executed on a raw HTML result. You can automatically generate parsers using AI or write them manually for advanced scenarios.
For in-depth instructions and examples, refer to these pages:
Quick start
1. Generate a parser
We recommend starting out with our AI-powered OxyCopilot tool that lets you generate scrapers and parsers without writing any code.
To access OxyCopilot, log in to the Oxylabs dashboard and select Scraper APIs Playground on the left-side menu.
Follow the steps shown in the video to generate a parser:
Here are the same steps shown in the video:
Enter the URL(s) you want to scrape and parse
Specify any parameters such as JavaScript rendering
Write a prompt that describes what you want to parse
Run OxyCopilot
Once you’re happy with the generated parser, load the instructions.
2. Save the parser as a preset
You can easily save your generated parsers through OxyCopilot for later use. See the steps below:
Assign the preset to a specific API user
Click Save
Enter the preset name and the description (optional)
After saving the preset, you can use it with API requests.
3. Use the parser with API requests
To use your preset with Web Scraper API, send a payload with the parser_preset parameter set to your preset's name. In the code samples below, we're reusing the example_parser preset created in previous steps.
Getting the HTML content of a parsed job
You may also retrieve the raw HTML result by adding ?type=raw to the end of the result retrieval URL. Read more here.
Last updated
Was this helpful?

