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.
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
The starting URL for the crawl (must include http:// or https:// protocol)
Maximum number of pages to crawl. Hard cap: 500.
Maximum link depth from the starting URL (0 = only the starting page)
Regex pattern. Only URLs matching this pattern will be followed and scraped.
Preserve hyperlinks in the Markdown output
Include image references in the Markdown output
Truncate base64-encoded image data in the Markdown output
Extract only the main content, stripping headers, footers, sidebars, and navigation
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