ai_parser_create
Generate a reusable AI parser from 1–3 example URLs to extract structured data from pages sharing the same layout. Use for repeatable scraping of similar pages like product listings.
Instructions
Create a reusable AI parser from example URLs.
Generates a parser that extracts structured data from pages sharing a
layout. Generation is ASYNCHRONOUS: this returns a parser id and version
immediately (e.g. {"id": "...", "version": 0}); poll 'ai_parser_get_details' until
its status is 'FINISHED' before calling 'ai_parser_parse_url'.
When to use:
- You want repeatable structured extraction across many similar pages
(e.g. product pages of one site) and there's no dedicated SDE for it
- You can provide 1–3 example URLs of the same page type
When NOT to use:
- A one-off fetch (use 'scrape') or a supported marketplace/SERP (use the SDE)
Args:
params (AiParserCreateParams): name and urls (1–3) are required;
optional scraper_params (fetch options) and fields (pre-declared
output schema).
Returns:
str: JSON with the new parser's id and version.
Raises:
ToolError: If the API key is missing, the rate limit is exceeded, the
inputs are invalid, or the request fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |