Introducing /answers: web research in one API call
Backed byYCombinator

Your documents.
Ready for your agent.

Turn PDFs, office documents, spreadsheets, and other supported files into readable Markdown. Add document context to the same workflows that use your web data.

report.pdf

Document input

Parsed

Markdown output

report.md

# Product research

Findings from customer interviews
and public documentation.

## What we learned

- Keep context with its source
- Refresh content when it changes
Illustrative document conversion

Teams build with Context.dev

  • Mintlify
  • daily.dev
  • Daydream
  • Super.com
Bring your own files
Send file bytes directly. Parse supports documents, spreadsheets, presentations, text, code, and supported image formats.
Read scanned PDFs
Enable OCR to recover selected PDF pages without a usable text layer. Pages that already contain text keep it.
Control the output
Choose a PDF page range, preserve links, and include image references when your workflow needs them.

A file goes in.
Markdown comes out.

Send a file stream with an optional extension hint. Read the Markdown and detected file type from the response, then combine it with your web content.

npm install context.dev
TypeScriptparse.ts
import { createReadStream } from 'node:fs';
import ContextDev from 'context.dev';

const client = new ContextDev({ apiKey: 'YOUR_API_KEY' });

const document = await client.parse.handle(
  createReadStream('report.pdf'),
  { extension: 'pdf', ocr: true },
);

console.log(document.markdown);
console.log(document.type);

From your first requestto a working feature.

  1. Send the file

    Upload the file bytes with the SDK or a POST request. Add an extension hint when needed.

  2. Choose what to read

    Limit PDF pages or enable OCR for scans. Keep the links and image references your application needs.

  3. Use the content

    Chunk and index the Markdown for retrieval, or give it directly to an agent as document context.

A few things
to know.

More details in the API documentation.

How is Parse different from Scrape?

Parse accepts file bytes you already have. Scrape starts from a URL and can return page content, images, screenshots, bytes, and fields selected with CSS rules.

Is this the same as the parse format in Scrape?

They serve different inputs. Scrape’s parse format selects fields from a web page with CSS rules. The Parse File API converts uploaded files into Markdown.

Can I parse a scanned PDF?

Yes. Set ocr to true to recover PDF pages without a usable text layer. You can restrict the operation with pdf.start and pdf.end. OCR has an additional charge for each page actually recovered.

Can I parse a document at a public URL?

Use Scrape for a document URL. Use Parse when you already have the file and want to send its bytes directly, including files uploaded by your users.

Start with your next request.

One API key for scraping, research, brand data, batches, and monitoring.