POST /web/extract when you know the fields you need but not which page contains them. Context.dev selects relevant pages from a starting URL, combines their content, and returns one data object shaped by your JSON Schema. The response includes urls_analyzed so you can trace the source pages.
If you need the page content itself, scrape Markdown. If the data is a product or brand profile, use the purpose-built Product or Brand API first.
Prerequisites
Create an API key in the dashboard and keep it in a server-side environment variable:Make an extraction request
Describe each field precisely. Use nullable types when the website may not state a value.maxPages defaults to 5 and accepts 1 to 50; it caps coverage rather than guaranteeing a page count.
Define the schema
The schema controls both extraction and output validation. A good schema makes missing evidence representable.- Put the semantic requirement in
description, including what to return when evidence is absent. - Use
integerfor whole numbers andnumberonly when decimals are valid. - Make uncertain fields nullable instead of asking the model to invent a placeholder.
- Keep
additionalProperties: falsewhen downstream code expects a fixed contract. - Validate
response.dataagain in your application with the same schema or source model.
Control evidence and coverage
Use
factCheck=true for database enrichment and facts shown to users, then validate consequential results against their sources. This setting asks the model to use stated evidence; it does not independently verify the website’s claims.
Read the result
urls_analyzed tells you which pages contributed content. metadata distinguishes successful, failed, skipped, and blocked pages. Keep this evidence with high-impact extracted values when auditability matters.
If every usable page is blocked or inaccessible, the request returns 400 WEBSITE_ACCESS_ERROR. If some pages are usable, extraction can succeed and metadata.numBlocked records the pages that were excluded.
Handle dynamic content
maxAgeMsdefaults to seven days and accepts values from0to 30 days.waitForMsandsettleAnimationshelp with content that appears shortly after page load.actionscan run up to five browser actions on the starting page. Actions require a paid plan.stopAfterMsis a soft crawl budget.timeoutOpts.millisecondsbounds the whole request;behavior: "return-partial"can return schema-valid data collected before the deadline withpartial: true. Incomplete JSON that fails your schema is never returned as a success. See Timeouts and partial results.- PDF links are parsed by default. Use
pdf.shouldParse=falseto skip them or provide a page range.
Reuse application types
When your project already uses Zod, Pydantic, or another schema library, generate JSON Schema from that source and validate the result with the same model.Next steps
Refreshable web datasets
Validate and save records with source history and resumable processing.
Competitor comparisons
Compare compatible facts while keeping unknown values visible.
Extract API reference
Review the complete request schema and error responses.
Scrape websites in batches
Collect raw content from many known URLs.
Monitor website changes
Check the same structured facts on a recurring schedule.