Parse a URL
GET https://aiparser.scraperapi.com/parse/{parser_id}/{version}?api_key=API_KEY&url=URLParameter
Required
Description
curl --request GET \
--url "https://aiparser.scraperapi.com/parse/<PARSER_ID>?api_key=API_KEY&url=https://quotes.toscrape.com/page/5/"import requests
parser_id = "PARSER_ID"
api_key = "API_KEY"
target_url = "https://quotes.toscrape.com/page/5/"
url = f"https://aiparser.scraperapi.com/parse/{parser_id}"
params = {
"api_key": api_key,
"url": target_url
}
response = requests.get(url, params=params)
print(response.status_code)
print(response.text)const parserId = "PARSER_ID";
const apiKey = "API_KEY";
const targetUrl = "https://quotes.toscrape.com/page/5/";
const url = new URL(`https://aiparser.scraperapi.com/parse/${parserId}`);
url.searchParams.append("api_key", apiKey);
url.searchParams.append("url", targetUrl);
async function run() {
const response = await fetch(url);
const data = await response.text();
console.log(response.status);
console.log(data);
}
run();{
"parser": "231fc251-decf-45ee-b7d8-738ac4a8hj76",
"version": 0,
"result": {
"quotes": [
{
"text": "“A reader lives a thousand lives before he dies, said Jojen. The man who never reads lives only one.”",
"author": "George R.R. Martin"
},
{
"text": "“You can never get a cup of tea large enough or a book long enough to suit me.”",
"author": "C.S. Lewis",
},
{
"text": "“You believe lies so you eventually learn to trust no one but yourself.”",
"author": "Marilyn Monroe",
},
{
"title": "“If you can make a woman laugh, you can make her do anything.”",
"author": "Marilyn Monroe",
},
{
"text": "“Life is like riding a bicycle. To keep your balance, you must keep moving.”",
"author": "Albert Einstein",
},
{
"text": "“The real lover is the man who can thrill you by kissing your forehead or smiling into your eyes or just staring into space.”",
"author": "Marilyn Monroe",
},
{
"text": "“A wise girl kisses but doesn't love, listens but doesn't believe, and leaves before she is left.”",
"author": "Marilyn Monroe",
},
{
"text": "“Only in the darkness can you see the stars.”",
"author": "Martin Luther King Jr.",
},
{
"text": "“It matters not what someone is born, but what they grow to be.”",
"author": "J.K. Rowling",
},
{
"text": "“Love does not begin and end the way we seem to think it does. Love is a battle, love is a war; love is a growing up.”",
"author": "James Baldwin",
}
],
"pagination": [
{
"previous": "/page/4/",
"next": "/page/6/"
}
],
}
}Last updated

