BuildE2EBuildE2E
DocsStart Free
ScrapingSync
Fetch Endpoints

Fetch

Extract content from any webpage in markdown or HTML format. Handles JavaScript rendering, anti-bot protection, and dynamic content automatically.
POST/v1/scrape/single
Fetch a single URL and extract its content.

Request Body

ParameterTypeDescription
urlrequired
stringThe URL to fetch
type
"markdown" | "html"Output format. Defaults to "markdown"
onlyMainContent
booleanExtract only main content (removes nav, ads, footers). Defaults to true
extractMetadata
booleanExtract page metadata (title, description, etc.)
summary
{ query: string }LLM summarization - provide a query/instruction for content summarization
pdfStrategy
"ocr" | "local" | "auto"PDF extraction strategy. ocr: vision-based OCR. local: pdf-parse only. auto: pdf-parse first, OCR if needed. Defaults to "ocr"
actions
Action[]Browser actions to execute after page load (click, wait, type, press, scroll, waitForSelector, navigate, goBack). Skips lightweight HTTP when present.
proxy
{ country: string }Proxy for geo-targeted requests (e.g., { country: "us" }). See supported countries

Example Request

curl -X POST https://api.builde2e.com/api/v1/scrape/single \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer uc-YOUR-API-KEY' \
  -d '{
    "url": "https://example.com/blog/ai-trends-2025",
    "type": "markdown",
    "onlyMainContent": true,
    "extractMetadata": true
  }'

Example Response

json
{
  "url": "https://example.com/blog/ai-trends-2025",
  "success": true,
  "markdown": "# AI Trends in 2025\n\nThe landscape of artificial intelligence...",
  "statusCode": 200,
  "metadata": {
    "title": "AI Trends in 2025 - Example Blog",
    "description": "Exploring the major AI trends shaping 2025",
    "canonicalUrl": "https://example.com/blog/ai-trends-2025",
    "finalUrl": "https://example.com/blog/ai-trends-2025",
    "contentType": "text/html",
    "contentLength": 45678
  },
  "timestamp": "2025-02-03T10:15:30.123Z",
  "cost": 0.002
}
POST/v1/scrape/batch
Fetch multiple URLs in a single request for better performance.

Request Body

ParameterTypeDescription
urlsrequired
string[] | object[]Array of URLs or fetch request objects
type
"markdown" | "html"Output format for all URLs. Defaults to "markdown"
onlyMainContent
booleanExtract only main content. Defaults to true
summary
{ query: string }LLM summarization for all content
pdfStrategy
"ocr" | "local" | "auto"PDF extraction strategy (applied to all). Defaults to "ocr"
proxy
{ country: string }Proxy for geo-targeted requests. Applies to all URLs. See supported countries

Example Request

curl -X POST https://api.builde2e.com/api/v1/scrape/batch \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer uc-YOUR-API-KEY' \
  -d '{
    "urls": [
      "https://example.com/page1",
      "https://example.com/page2",
      "https://example.com/page3"
    ],
    "type": "markdown",
    "onlyMainContent": true
  }'

Example Response

json
{
  "results": [
    {
      "url": "https://example.com/page1",
      "success": true,
      "markdown": "# Page 1 Content...",
      "statusCode": 200,
      "cost": 0.002
    },
    {
      "url": "https://example.com/page2",
      "success": true,
      "markdown": "# Page 2 Content...",
      "statusCode": 200,
      "cost": 0.002
    },
    {
      "url": "https://example.com/page3",
      "success": false,
      "error": "Page not found",
      "statusCode": 404,
      "cost": 0
    }
  ],
  "total": 3,
  "successful": 2,
  "failed": 1,
  "timestamp": "2025-02-03T10:15:30.123Z",
  "cost": 0.004
}

Response Fields

FieldTypeDescription
urlstringThe fetched URL
successbooleanWhether the fetch was successful
markdownstringExtracted content as markdown (if type="markdown")
htmlstringRaw HTML content (if type="html")
statusCodenumberHTTP status code of the response
metadataobjectPage metadata (title, description, canonicalUrl, finalUrl, contentType, contentLength)
contentstringSummarized content (when summary query provided)
timestampstringISO timestamp when fetching completed
costnumberCost of the request in USD
errorstringError message if fetching failed

LLM Summarization

You can ask the API to summarize the fetched content using an LLM. This is useful when you need specific information extracted from a page.

Example with Summary

curl -X POST https://api.builde2e.com/api/v1/scrape/single \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer uc-YOUR-API-KEY' \
  -d '{
    "url": "https://example.com/products/laptop-x1",
    "type": "markdown",
    "summary": {
      "query": "Extract the product name, price, and key features in JSON format"
    }
  }'
The response will include a content field with the summarized output:
json
{
  "url": "https://example.com/products/laptop-x1",
  "success": true,
  "markdown": "# Laptop X1 Pro...",
  "content": "{\n  \"name\": \"Laptop X1 Pro\",\n  \"price\": \"$1,299\",\n  \"specs\": {\n    \"cpu\": \"Intel Core i7\",\n    \"ram\": \"16GB\",\n    \"storage\": \"512GB SSD\"\n  }\n}",
  "cost": 0.003
}

Pricing

Flat per-URL pricing. The API automatically selects the best fetching method, and the cost is returned in each response.
OperationCost (USD)Description
Fetch (any method)$0.002/URLFlat rate per URL (~$2.00 per 1000)
Fetch + Summary$0.001/URLAdditional flat fee when summary is requested (~$1.00 per 1000)
PDF OCR$0.003/pageOCR for scanned PDFs (~$3.00 per 1000 pages)
Cached$0.002/URLReduced rate for cached content (~$2.00 per 1000)