← Back to Context.dev
POST/web/crawl

Crawl website and extract Markdown

Performs a crawl starting from a given URL, extracts page content as Markdown, and returns results for all crawled pages. Only follows links within the same domain as the starting URL. Costs 1 credit per successful page crawled.

Context.dev·$0.03 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "context-dev", path: "/web/crawl", body: { "url": "example" } }); console.log(output);

Body parameters

urlrequired
string

The starting URL for the crawl (must include http:// or https:// protocol)

maxPages
integer

Maximum number of pages to crawl. Hard cap: 500.

maxDepth
integer

Maximum link depth from the starting URL (0 = only the starting page)

urlRegex
string

Regex pattern. Only URLs matching this pattern will be followed and scraped.

includeLinks
boolean

Preserve hyperlinks in the Markdown output

includeImages
boolean

Include image references in the Markdown output

shortenBase64Images
boolean

Truncate base64-encoded image data in the Markdown output

useMainContentOnly
boolean

Extract only the main content, stripping headers, footers, sidebars, and navigation

followSubdomains
boolean

When true, follow links on subdomains of the starting URL's domain (e.g. docs.example.com when starting from example.com). www and apex are always treated as equivalent.

Response

results.0.markdown
string
results.0.metadata.url
string
results.0.metadata.title
string
results.0.metadata.success
boolean
results.0.metadata.crawlDepth
number
results.0.metadata.statusCode
number
metadata.numUrls
number
metadata.numFailed
number
metadata.numSkipped
number
metadata.numSucceeded
number
metadata.maxCrawlDepth
number
key_metadata.credits_consumed
number
key_metadata.credits_remaining
number
    Orthogonal - Giving AI agents the tools they need.