Scrape API
Convert a public webpage to Markdown, HTML or links with the AIHackr Scrape API. Includes request examples, response fields and browser options.
On this page
Request
POST https://aihackr.com/v2/scrape returns one requested representation of a public webpage. Browser rendering can capture JavaScript-produced content; the result still depends on the target’s behavior and access rules.
curl --fail-with-body https://aihackr.com/v2/scrape \
-H "Authorization: Bearer $AIHACKR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"formats": [
"markdown"
]
}'Parameters
| Field | Type | Behavior |
|---|---|---|
| url | string, required | Public HTTP(S) URL. No embedded credentials, private network addresses or custom ports. |
| formats | array | Choose exactly one of markdown, html or links. Default: markdown. |
| gotoOptions | object, optional | waitUntil: load, domcontentloaded, networkidle0 or networkidle2. timeout: 1,000–45,000 milliseconds, default 30,000. |
| waitForSelector | string, optional | A CSS selector of at most 200 characters to wait for before reading the page. |
Choose the output
- Markdown: text-oriented input for reading, chunking and AI workflows.
- HTML: rendered page markup when structure matters. Treat it as untrusted content.
- Links: the browser’s link result. Use Map for normalized, deduplicated same-origin discovery.
Response shape
This is an illustrative success shape; content and metadata vary with the target.
{
"success": true,
"data": {
"markdown": "# Example Domain\n…",
"metadata": {
"sourceURL": "https://example.com",
"url": "https://example.com/",
"observedAt": "2026-11-09T00:00:00.000Z",
"engine": "cloudflare-browser-run"
}
},
"engine": "cloudflare-browser-run"
}Constraints and failures
Cookies, target authorization headers, arbitrary browser actions and scripts are not supported. Robots restrictions and target HTTP failures may stop a request. This endpoint is not an anti-bot bypass service. Each admitted browser operation reserves a trial page even if an upstream request later fails. See error handling.