Overview & Quickstart
Overview
The AI Parser helps you to turn raw HTML responses from a website of your choice into clean, structured data. Feed it a few example URLs with the same structure: for example three product pages from a catalog. The AI Parser will generate a custom parser, that will extract the important data fields (or the ones you specify) from any similar page on that site (domain), automatically.
Base URL: https://aiparser.scraperapi.com
How it works in 3 steps
Train - send a few example URLs (up to 3) of the same page type (e.g. three product pages) to
POST /parsersWait - the system generates a parser tailored to the page’s layout.
Parse - send any similar URL to
GET /parse/{parser_id}and get structured data back.
Authentication
Every endpoint needs an api_key. Pass it in the request body for POST/PATCH, or as a query parameter for GET/DELETE operations.
Quickstart
Create a parser
curl -X POST https://aiparser.scraperapi.com/parsers \
-H "Content-Type: application/json" \
-d '{
"name": "Quotes_Parser",
"api_key": "API_KEY",
"urls": [
"http://quotes.toscrape.com/page/1/",
"http://quotes.toscrape.com/page/2/",
"http://quotes.toscrape.com/page/3/"
]
}'import requests
url = "https://aiparser.scraperapi.com/parsers"
payload = {
"name": "Quotes_Parser",
"api_key": "API_KEY",
"urls": [
"http://quotes.toscrape.com/page/1/",
"http://quotes.toscrape.com/page/2/",
"http://quotes.toscrape.com/page/3/"
]
}
headers = {
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.text)Response
Check the Parser's state
Parse similar URL
What's next
Understand how prasers and versions work.
Browse the endpoints.
Check out Pricing & Limits.
Hit a wall? Check out Debugging & Troubleshooting section.

