POST Scrape URL
Submit a single URL for scraping
Last updated Jul 15, 2026
https://api.anakin.io/v1/url-scraperSubmit a single URL for scraping. The job is processed asynchronously — use the returned jobId to poll for results.
Request Body
{
"url": "https://example.com",
"formats": ["markdown", "html", "links"],
"country": "us",
"useBrowser": false,
"generateJson": false,
"webhook_url": "https://your-app.com/hooks/anakin"
}Only url is required — every other field is optional.
| Parameter | Type | Description |
|---|---|---|
url required | string | The URL to scrape. Must be valid HTTP/HTTPS. |
formats optional | string[] | Which outputs to produce: markdown, html, cleanedHtml, links, images, summary, screenshot, screenshotFullPage, json. Defaults to markdown + HTML + cleaned HTML. |
country optional | string | Country code for proxy routing. Default "us". See Supported Countries (207 locations). |
useBrowser optional | boolean | Use headless Chrome with Playwright. Default false. Best for JS-heavy sites. |
generateJson optional | boolean | AI-extract structured JSON from the content. Default false. |
outputSchema optional | object | JSON Schema describing the fields to extract. Implies generateJson: true. |
sessionId optional | string | Browser session ID for scraping authenticated pages. See Browser Sessions. |
webhook_url optional | string | URL to POST a signed job.completed / job.failed event to when the job settles — skip polling. See Webhooks. |
actions optional | object[] | Ordered browser actions executed before the page is captured. Implies useBrowser: true and costs +1 credit. See Browser Actions below. |
Browser Actions
Pass an actions array to interact with the page before it is captured — click "load more" buttons, dismiss banners, scroll lazy-loaded content into view, or fill in a search box. Actions run in order in a real browser.
{
"url": "https://example.com/products",
"actions": [
{ "type": "wait_for", "selector": ".product-grid" },
{ "type": "click", "selector": "button.load-more" },
{ "type": "wait", "milliseconds": 1500 },
{ "type": "scroll", "direction": "down" }
]
}| Type | Fields | Description |
|---|---|---|
wait | milliseconds required | Pause for a fixed duration (1–15000ms). |
wait_for | selector required, milliseconds optional | Wait until a CSS selector appears (default max wait 10000ms). |
click | selector required | Click the first element matching a CSS selector. Missing elements are skipped. |
scroll | direction optional (up/down, default down), selector optional | Scroll the page (or a specific element) by ~one viewport. |
write | text required | Type text into the currently focused element (max 1000 chars). |
press | key required | Press a keyboard key, e.g. Enter, Tab. |
Limits: max 15 actions per request; each wait capped at 15 seconds; total wait time across all actions capped at 30 seconds; selectors capped at 500 characters. Requests exceeding a limit are rejected with 400.
Response
202 Accepted{
"jobId": "job_abc123xyz",
"status": "pending"
}The job is processed asynchronously. Use the jobId with GET /v1/url-scraper/{id} to check status and retrieve results.
Code Examples
curl -X POST https://api.anakin.io/v1/url-scraper \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"country": "us",
"useBrowser": false,
"generateJson": false
}'import requests
response = requests.post(
'https://api.anakin.io/v1/url-scraper',
headers={'X-API-Key': 'your_api_key'},
json={
'url': 'https://example.com',
'country': 'us',
'useBrowser': False,
'generateJson': True
}
)
data = response.json()
print(f"Job submitted: {data['jobId']}")const response = await fetch('https://api.anakin.io/v1/url-scraper', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com',
country: 'us',
useBrowser: false,
generateJson: true
})
});
const data = await response.json();
console.log(data.jobId);