Parse a URL

Use an existing parser to extract data from a URL

GET https://aiparser.scraperapi.com/parse/{parser_id}/{version}?api_key=API_KEY&url=URL

Path Parameters

Parameter
Required
Description

parser_id

Yes

The ID returned when the parser was created

version

No

Parser version to use. If omitted, the latest is used

Query Parameters

api_key

Yes

Your ScraperAPI API Key

url

Yes

The URL to parse

No

Additional ScraperAPI parameters


Example

curl --request GET \
  --url "https://aiparser.scraperapi.com/parse/<PARSER_ID>?api_key=API_KEY&url=https://quotes.toscrape.com/page/5/"

Response

{
	"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/"
			}
		],
	}
}

The exact shape of result depends on the fields the parser learned.

Last updated