AI Parser (Closed Beta)

Overview

The AI Parser helps you to turn any website into clean, structured data automatically.

By providing example URLs, the service creates intelligent parsers that can extract structured data from similar pages. This documentation describes all available endpoints and their usage.

Base URL: https://aiparser.scraperapi.com

Authentication

All endpoints require an API key to be provided either in the request body or as a query parameter.

Endpoints

Create a Parser

Creates a new parser based on example URLs.

POST /parsers

Example Request Body:

{
  "name": "Example_Name",
  "api_key": "your_scraperapi_key",
  "urls": [
    "https://example.com/product-01"
  ]
}

Response:

Optional Fields:

circle-exclamation

The version field in the response plays a role to identify different versions of a parser. To create further versions you can use the Update Parser Fields endpoint.

Parse a URL

Uses an existing parser to extract data from a URL.

Path Parameters:

  • version (optional): Parser version to use. Defaults to latest if omitted.

Query Parameters:

  • api_key - Your ScraperAPI Key.

  • url - The URL to parse.

  • Additional ScraperAPI parameters can be added as query parameters. List of supported params can be found here.

Response:

circle-exclamation

List Parsers

Retrieves a list of all parsers for your account.

Response:

Get Parser Details

Retrieves detailed information about a specific parser.

Path Parameters:

  • version (optional): Parser version to retrieve. Defaults to latest if omitted

Response:

Delete Parser

Deletes a specific parser.

Response:

  • 204 No Content on success - validates that the parser has been deleted.

Update Parser Fields

Update, rename, or remove fields from a parser. All modifications create a new parser version. Some changes require processing time, while others apply immediately.

Path Parameters:

  • version (optional): Base version to update. Defaults to latest if omitted

Request Body:

Response:

  • If processing time is required (when add_fields or modify_fields are present) you will get a 202 Accepted response with the newly created version and schedules generation.

  • If only synchronous changes are requested (rename_fields and/or remove_fields) you will get 200 OK response with the newly created version. Changes apply immediately

circle-exclamation

ScraperAPI Parameters

The following parameters can be used to customize the scraping behavior

Parameter
Type
Description

render

Boolean

Enable JavaScript rendering

country_code

String

Two-letter country code (e.g., “US”)

premium

Boolean

Use residential proxies

session_number

Integer

Session number for maintaining IPs

keep_headers

Boolean

Preserve custom headers

device_type

String

“desktop” or “mobile”

ultra_premium

Boolean

Use advanced unblocking mechanisms.

follow_redirect

Boolean

Follow HTTP redirects. True by default.

retry_404

Boolean

Retry on 404 errors

Best Practices

  1. URL Selection

  • Provide multiple URLs (up to 3) of the same type.

  • Ensure URLs are accessible.

  • Include URLs with different variations of the same content.

  1. Parser Usage

  • If results are not satisfactory, retry generating either with the same parameters or try modifying the parameters or use the newly introduced PATCH /parsers endpoint.

  • Different scrapes may yield different results due to website variations.

  • Use appropriate ScraperAPI parameters (where necessary) based on the target website.

  1. Error Handling

  • Always check for error responses.

  • Handle rate limits and timeouts appropriately.

  • Monitor parser performance and adjust parameters as needed.

Rate Limits

Please refer to your ScraperAPI plan for specific rate limits. The AI Parser service inherits these limits from your ScraperAPI account.

Support

For support or questions about the AI Parser service, please contact bernadette@scraperapi.com or engineering@scraperapi.com.

Credits & Usage Limits

Each tester account is allocated a certain number of parser creation and usage credits. If your credits are exhausted, requests will return an HTTP 402 Payment Required status.

To continue using the parser, you can request additional credits by reaching out to us at engineering@scraperapi.com.

Updates

  1. 2025-09-01

  • Added optional version path parameter to GET /parse/{parser_id}/{version}? and GET /parsers/{parser_id}/{version}? . If omitted, latest version is used.

  • Introduced PATCH /parsers/{parser_id}/{version}? to add/modify/rename/remove fields. Adding/modifying fields creates a new version; renaming/removing applies immediately.

  • POST /parsers now accepts optional fields to guide parser generation. Supports dot notation for nested fields like "products.name" .

  • Optional parameters are explicitly marked in the docs.

Tried AI Parser?

Take this 2 mins survey arrow-up-rightto help us improve our upcoming releases.

Last updated