← Back to Context.dev
POST/web/extract

Extract Structured Website Data

Crawl a website, use the provided JSON Schema and instructions to prioritize relevant internal links, and extract structured data from the selected pages.

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/extract", body: { "url": "example", "schema": {} } }); console.log(output);

Body parameters

urlrequired
string

The starting website URL to crawl and extract from. Must include http:// or https://.

schemarequired
object

JSON Schema for the returned data object.

instructions
string

Optional extraction guidance, such as which facts to prioritize or how to interpret fields.

factCheck
boolean

When true, every returned value must be grounded in facts stated on the page.

followSubdomains
boolean

When true, follow links on subdomains of the starting URL's domain.

maxPages
integer

Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.

maxDepth
integer

Optional maximum link depth from the starting URL (0 = only the starting page).

includeFrames
boolean

When true, iframe contents are included in Markdown before extraction.

maxAgeMs
integer

Return cached scrape results if younger than this many milliseconds.

waitForMs
integer

Optional browser wait time in milliseconds after initial page load for each crawled page.

stopAfterMs
integer

Soft time budget for the crawl in milliseconds. Min: 10000. Max: 110000. Default: 80000.

Response

url
string
data.founded_year
number
status
string
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
urls_analyzed.0
string
    Orthogonal - Giving AI agents the tools they need.