POST Scrape URL

Submit a single URL for scraping

Last updated Jul 15, 2026

POSThttps://api.anakin.io/v1/url-scraper

Submit 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.

ParameterTypeDescription
url requiredstringThe URL to scrape. Must be valid HTTP/HTTPS.
formats optionalstring[]Which outputs to produce: markdown, html, cleanedHtml, links, images, summary, screenshot, screenshotFullPage, json. Defaults to markdown + HTML + cleaned HTML.
country optionalstringCountry code for proxy routing. Default "us". See Supported Countries (207 locations).
useBrowser optionalbooleanUse headless Chrome with Playwright. Default false. Best for JS-heavy sites.
generateJson optionalbooleanAI-extract structured JSON from the content. Default false.
outputSchema optionalobjectJSON Schema describing the fields to extract. Implies generateJson: true.
sessionId optionalstringBrowser session ID for scraping authenticated pages. See Browser Sessions.
webhook_url optionalstringURL to POST a signed job.completed / job.failed event to when the job settles — skip polling. See Webhooks.
actions optionalobject[]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" }
  ]
}
TypeFieldsDescription
waitmilliseconds requiredPause for a fixed duration (1–15000ms).
wait_forselector required, milliseconds optionalWait until a CSS selector appears (default max wait 10000ms).
clickselector requiredClick the first element matching a CSS selector. Missing elements are skipped.
scrolldirection optional (up/down, default down), selector optionalScroll the page (or a specific element) by ~one viewport.
writetext requiredType text into the currently focused element (max 1000 chars).
presskey requiredPress 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
  }'