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 /parsersExample Request Body:
{
"name": "Example_Name",
"api_key": "your_scraperapi_key",
"urls": [
"https://example.com/product-01"
]
}Response:
Optional Fields:
Maximum of 3 URLs allowed.
More URLs of the same type improve parser quality.
All URLs must be valid and accessible.
All
scraper_paramsfields are optional.Optional:
fieldslets you predefine desired fields (name,description, optionaltypeand selector) to guide generation.You can use dot notation for nested fields, e.g., "
products.name".
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:
The parser must exist and be valid.
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_fieldsormodify_fieldsare present) you will get a202 Acceptedresponse with the newly created version and schedules generation.If only synchronous changes are requested (
rename_fieldsand/orremove_fields) you will get200 OKresponse with the newly created version. Changes apply immediately
Only
api_keyis required; all other properties are optional.Field objects support
name,description, optionaltype(string,number,array) and optionalselector.Use dot notation for nested fields (e.g., "
products.name" ).
ScraperAPI Parameters
The following parameters can be used to customize the scraping behavior
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
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.
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 /parsersendpoint.Different scrapes may yield different results due to website variations.
Use appropriate ScraperAPI parameters (where necessary) based on the target website.
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
2025-09-01
Added optional
versionpath parameter toGET /parse/{parser_id}/{version}?andGET /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 /parsersnow accepts optionalfieldsto 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 to help us improve our upcoming releases.
Last updated