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

AI Parser <--> n8n

The AI Parser turns raw HTML into clean, structured JSON. It needs 1-3 example URLs from the same domain that share the same page layout (3 product pages, 3 search pages, etc.) to generate a reusable parser tailored to that layout. The parser can then be used with any similar page on the same site to extract the same fields automatically.

How it Works

  1. Create a Parser - provide a name and up to 3 example URLs of the same page type. Generation is asynchronous. The node returns an id and a version.

  2. Wait for generation - use the Get a Parser operation to check status (GENERATING, FINISHED or FAILED). Wait until FINISHED before parsing.

  3. Run the Parser - use the Parse a URL operation to extract structured JSON from any URL with the same page layout.

Using the AI Parser in a workflow

  1. Add a ScraperAPI Node .

  2. Select Create a Parser, enter a Name and give up to 3 Example URLs, then execute.

  3. Copy the returned parser id.

  4. Add another node, select Get a Parser, enter the parser id and execute until the status is FINISHED.

  5. Add another node, select Parse a URL, enter the parser id and a target URL.

  6. Execute to get structured JSON for your downstream nodes.

Actions

The ScraperAPI node exposes six AI Parser actions:

▸ Create a Parser Builds a new parser from 1-3 example URLs. Generation is asynchronous. Poll Get a parser until the status is FINISHED.

Example Response
Parameter
Parameter Type
Description

Name

REQUIRED

A name to identify the parser.

Example URLs

REQUIRED

1-3 example URLs of the same type.

Fields

OPTIONAL

Predefined fields to guide generation. Each supports name, description, type (string, number, array), and an optional CSS or XPath selector. Use dot notation for nested fields (e.g. "products.name").

Scraper Parameters

OPTIONAL

ScraperAPI parameters to be used when fetching the example pages - see supported parameters.

▸ Get a Parser Retrieves a parser's status, fields and example results. Use it to confirm generation has finished before parsing.

Example Response - GENERATING
Example Response - FINISHED
Example Response - FAILED
Example Response - NOT FOUND
Parameter
Parameter Type
Description

Parser ID

REQUIRED

The parser ID.

Version

OPTIONAL

A specific version to retrieve. Leave as -1 for the latest.

▸ Update a Parser Modifies fiels of an existing parser. Adding or modifying fields triggers the generation of a new version. renaming and removing are applied immediately.

Example Response
Parameter
Parameter Type
Description

Parser ID

REQUIRED

The parser ID.

Version

OPTIONAL

A specific version to update. Leave as -1 for the latest.

Add Fields

OPTIONAL

Fields to add (name, description, type, selector).

Modify Fields

OPTIONAL

Modify existing field with clearer description if it was extracted incorrectly.

Rename Fields

OPTIONAL

Rename a filed (name, new_name).

Remove Fields

OPTIONAL

Remove fields from the parser. You can also drag and drop fields directly from the fields list.

▸ Parse a URL Use an existing parser to extract data from a URL.

Example Response
Parameter
Parameter Type
Description

Parser ID

REQUIRED

The parser ID.

URL

REQUIRED

The target URL to scrape and parse.

Version

OPTIONAL

A specific version to apply. Leave as -1 for the latest.

Scraper Parameters

OPTIONAL

ScraperAPI parameters to be used when fetching the target URL - see supported parameters.

▸ List Parsers Lists all parsers on your account. This one does not require any parameters.

Example Response

▸ Delete a Parser Permanently delete a parser (and all its versions).

Example Response

Learn more

Last updated