Skip to main content
POST
/
api
/
agent
/
scrape
Web Scraper
curl --request POST \
  --url https://encrata.com/api/agent/scrape \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "render_js": true
}
'
{
  "success": true,
  "url": "https://example.com/pricing",
  "status_code": 200,
  "content": "# Pricing\n\nSimple, transparent pricing...\n\n| Plan | Price |\n|------|-------|\n| Starter | $29/mo |",
  "metadata": {
    "title": "Pricing — Example",
    "description": "Simple, transparent pricing for teams of all sizes.",
    "language": "en"
  },
  "credits": 2,
  "latency_ms": 1840
}

Authentication

Requires an API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY

Request

url
string
required
The URL to scrape. Must be a valid http:// or https:// URL.
render_js
boolean
Render the page in a headless browser before extracting content. Use for JavaScript-heavy sites. Default: false.

Response

Returns the page content as clean markdown along with HTTP status and page metadata.
{
  "success": true,
  "url": "https://example.com/pricing",
  "status_code": 200,
  "content": "# Pricing\n\nSimple, transparent pricing...\n\n| Plan | Price |\n|------|-------|\n| Starter | $29/mo |",
  "metadata": {
    "title": "Pricing — Example",
    "description": "Simple, transparent pricing for teams of all sizes.",
    "language": "en"
  },
  "credits": 2,
  "latency_ms": 1840
}

Credits

2 credits per scrape. Failed scrapes (blocked, captcha, rate-limited) are automatically refunded.
  • POST /api/agent/extract — Extract structured data from a page using a JSON schema (3 credits)
  • POST /api/agent/screenshot — Capture a full-page screenshot (5 credits)