Providers
Context.dev
The Context.dev API for search with Markdown ranked by relevance and for scraping pages into Markdown or HTML.
- env var
- CONTEXT_DEV_API_KEY
- auth
- Bearer header
- operations
- search · read
- results
- 10, up to 100
Address it
import { create, readUrl } from "@agntn/web";
const context = await create("context"); // CONTEXT_DEV_API_KEY
const results = await context.search("nitro cloudflare preset", { includeDomains: ["nitro.build"] });
const page = await readUrl("https://nitro.build/deploy", { provider: "context", format: "markdown" });
Bearer auth against api.context.dev/v1.
What it reads
| Call | Endpoint |
|---|---|
search | POST /web/search |
read | GET /web/scrape/markdown?… |
What comes back
Each search result carries the page's Markdown in text when Context.dev has it, plus metadata.relevance (high, medium, low) and metadata.markdownCode. Domain filters work. No categories, sources or dates. Reads give markdown or html and take targetSelector, removeSelector, timeout and noCache.
Gotchas
- Spent credits are not a bad key. Context.dev returns 401 with
error_code: "USAGE_EXCEEDED"; the adapter reportsPaymentError, preserving the HTTP status and body. Automatic search and read can try the next configured provider. Other 401 responses remainAuthErrorand stop the chain; an explicit provider never switches. maxResultsgoes up to 100, default 10.
Where it lives
src/providers/context.ts.
Brave
The Brave Search API, one GET per page, with extra snippets joined into text and a continuation that carries the offset.
Exa
The Exa neural search API, the richest result shape of the built-ins, with highlights by default and summaries and full text on request, and Exa Contents for reading pages.