BuildE2EBuildE2E
DocsStart Free
ScrapingCrawl
Crawl Endpoint

Crawl

Recursively crawl a website following links within the same domain. Uses BFS (breadth-first search) with configurable depth and path filtering. Returns scraped content for each page.
POST/v1/crawl
Recursively crawl a website and return content for each discovered page.

Request Body

ParameterTypeDescription
urlrequired
stringStarting URL to crawl from
limit
numberMax pages to crawl (1-100). Defaults to 10
maxDepth
numberMax link depth from start URL (1-10). Defaults to 3
includePaths
string[]Regex patterns — only crawl paths matching at least one pattern
excludePaths
string[]Regex patterns — skip paths matching any pattern
allowSubdomains
booleanFollow links to subdomains of the base domain. Defaults to false
ignoreQueryParameters
booleanStrip query parameters when deduplicating URLs. Defaults to false
type
"html" | "markdown"Output content format. Defaults to "markdown"
onlyMainContent
booleanExtract only main content (strips nav, ads, footers). Defaults to true
proxy
{ country: string }Proxy for geo-targeted requests. See supported countries

Example Request

curl -X POST https://api.builde2e.com/api/v1/crawl \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer uc-YOUR-API-KEY' \
  -d '{
    "url": "https://docs.example.com",
    "maxDepth": 2,
    "limit": 50,
    "type": "markdown"
  }'

Example Response

json
{
  "success": true,
  "data": [
    {
      "url": "https://example.com/blog",
      "html": null,
      "markdown": "# Blog\n\nLatest posts...",
      "statusCode": 200,
      "success": true,
      "depth": 0
    },
    {
      "url": "https://example.com/blog/hello-world",
      "html": null,
      "markdown": "# Hello World\n\nWelcome to our blog...",
      "statusCode": 200,
      "success": true,
      "depth": 1
    },
    {
      "url": "https://example.com/blog/getting-started",
      "html": null,
      "markdown": "# Getting Started\n\nHere's how to begin...",
      "statusCode": 200,
      "success": true,
      "depth": 1
    }
  ],
  "total": 3,
  "completed": 3,
  "failed": 0,
  "cost": 0.006,
  "timestamp": "2026-03-04T10:15:45.123Z"
}

Response Structure

Top-level Fields

FieldTypeDescription
successbooleanWhether the crawl completed successfully
dataCrawlPageResult[]Array of results, one per crawled page
totalnumberTotal pages attempted
completednumberSuccessfully scraped pages
failednumberFailed pages
costnumberTotal cost in USD ($0.002 per successfully scraped page; failed pages are not charged)
errorstringError message if crawl failed entirely
timestampstringISO timestamp of the response

CrawlPageResult Object

Each item in the data array contains:
FieldTypeDescription
urlstringPage URL
htmlstring | nullHTML content (when type is "html", null otherwise)
markdownstring | nullMarkdown content (when type is "markdown", null otherwise)
statusCodenumber | nullHTTP status code
successbooleanWhether scraping this page succeeded
errorstringError message if page failed (optional)
metadataobjectPage metadata — title, description, etc. (optional)
depthnumberLink depth from start URL (0 = start page)

Pricing

Charged per page at $$0.002/page. Only successfully scraped pages are charged — failed pages incur no cost.
Example: crawling 20 pages where 18 succeed costs 18 x $$0.002 = $$0.036.