POST Scrape URL

Submit a single URL for scraping

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
}

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.

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
  }'