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 /parsers
Wait - 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.
{"name":"My_Product_Parser","created_at":"2026-05-08T14:17:31.657Z","generated_at":"2026-05-08T14:17:34.961Z","status":"FAILED","error":"DownloadError: Failed to download https://example.com/product-01 after 3 retries","example_result":null}
import java.io.*;
import java.net.*;
public class Main {
public static void main(String[] args) {
try {
String parserId = "PARSER_ID";
String apiKey = "API_KEY";
String targetUrl = "https://quotes.toscrape.com/page/4/";
String query = String.format(
"api_key=%s&url=%s",
URLEncoder.encode(apiKey, "UTF-8"),
URLEncoder.encode(targetUrl, "UTF-8")
);
URL url = new URL(
"https://aiparser.scraperapi.com/parse/" + parserId + "?" + query
);
BufferedReader in = new BufferedReader(
new InputStreamReader(url.openStream())
);
StringBuilder response = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
response.append(line);
}
in.close();
System.out.print(response.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
{
"header": [
{
"title": "Quotes to Scrape",
"login_link": "Login"
}
],
"quotes": [
{
"text": "“The more that you read, the more things you will know. The more that you learn, the more places you'll go.”",
"author": "Dr. Seuss",
"about_link": "/author/Dr-Seuss",
"tags": [
{ "tag": "learning" }
]
},
{
"text": "“Of course it is happening inside your head, Harry, but why on earth should that mean that it is not real?”",
"author": "J.K. Rowling",
"about_link": "/author/J-K-Rowling",
"tags": [
{ "tag": "dumbledore" }
]
},
{
"text": "“The truth is, everyone is going to hurt you. You just got to find the ones worth suffering for.”",
"author": "Bob Marley",
"about_link": "/author/Bob-Marley",
"tags": [
{ "tag": "friendship" }
]
},
{
"text": "“Not all of us can do great things. But we can do small things with great love.”",
"author": "Mother Teresa",
"about_link": "/author/Mother-Teresa",
"tags": [
{ "tag": "misattributed-to-mother-teresa" }
]
},
{
"text": "“To the well-organized mind, death is but the next great adventure.”",
"author": "J.K. Rowling",
"about_link": "/author/J-K-Rowling",
"tags": [
{ "tag": "death" }
]
},
{
"text": "“All you need is love. But a little chocolate now and then doesn't hurt.”",
"author": "Charles M. Schulz",
"about_link": "/author/Charles-M-Schulz",
"tags": [
{ "tag": "chocolate" }
]
},
{
"text": "“We read to know we're not alone.”",
"author": "William Nicholson",
"about_link": "/author/William-Nicholson",
"tags": [
{ "tag": "misattributed-to-c-s-lewis" }
]
},
{
"text": "“Any fool can know. The point is to understand.”",
"author": "Albert Einstein",
"about_link": "/author/Albert-Einstein",
"tags": [
{ "tag": "knowledge" }
]
},
{
"text": "“I have always imagined that Paradise will be a kind of library.”",
"author": "Jorge Luis Borges",
"about_link": "/author/Jorge-Luis-Borges",
"tags": [
{ "tag": "books" }
]
},
{
"text": "“It is never too late to be what you might have been.”",
"author": "George Eliot",
"about_link": "/author/George-Eliot",
"tags": [
{ "tag": "inspirational" }
]
}
],
"pagination": [
{
"previous": "/page/3/",
"next": "/page/5/"
}
],
"top_tags": [
{ "top_tag": "love" },
{ "top_tag": "inspirational" },
{ "top_tag": "life" },
{ "top_tag": "humor" },
{ "top_tag": "books" },
{ "top_tag": "reading" },
{ "top_tag": "friendship" },
{ "top_tag": "friends" },
{ "top_tag": "truth" },
{ "top_tag": "simile" }
],
"footer": [
{
"credits": "Made with ❤ by Zyte"
}
]
}