Scrape
Scrape a URL
Fetch a single URL and return it in the formats you ask for. Waits for the result by default, returning a job id if it runs long; set async to always return a job id immediately.
post/v1/web/scrape
Request
- Base URL: https://api.hydrafetch.com
- URL: https://api.hydrafetch.com/v1/web/scrape
- Auth: API key in header X-API-Key
Request body
Example request
{
"url": "https://example.com",
"includeTags": [
"article",
"main"
],
"excludeTags": [
".ad",
"#comments"
],
"location": {
"country": "us",
"languages": [
"en-US",
"en"
]
},
"body": "{\"limit\":25,\"offset\":0}",
"formats": [
"markdown"
],
"jsonOptions": {
"prompt": "Extract the product name, price, and availability."
}
}Response
The scraped page.
Example response
{
"data": {
"url": "https://example.com",
"finalUrl": "https://example.com/",
"status": 200,
"metadata": {
"structure": "markdown",
"pageType": "article",
"wordCount": 214
},
"usage": {
"creditsUsed": 1,
"creditsRemaining": 4999,
"freshness": "fresh"
},
"quality": {
"confidence": 0.94,
"complete": true
},
"structured": {
"entities": [
{
"type": "Product"
}
]
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.