Pull live web pages, brand data, logos, and search results into Convex actions via the Context.dev API without maintaining scrapers.
npm install @context-dot-dev/convexContext.dev is a Convex component that wraps the Context.dev REST API, exposing it through typed Convex actions. It provides capabilities for web scraping, site crawling, structured data extraction, brand and logo lookup, and web search without requiring you to build or maintain scrapers. The component does not persist data in Convex; caching is handled by the Context.dev API via parameters like `maxAgeMs`.
The Context.dev Convex component exposes scrapeMarkdown and scrapeHtml helper methods that can be called directly from Convex actions. Install @context-dot-dev/convex, configure your API key as a Convex environment variable, and call contextDev.scrapeMarkdown(ctx, { params: { url } }) to get clean Markdown back from any URL.
The Context.dev component provides retrieveBrand, retrieveBrandByName, retrieveBrandByEmail, and retrieveBrandByTicker methods that return full brand payloads including logos, colors, and typography. Call these from a Convex action using the typed ContextDev client to enrich user or company records without building a scraper.
The extract helper method crawls pages and extracts structured data based on a JSON schema you provide. This lets you run AI-powered data extraction pipelines entirely within Convex actions by calling contextDev.extract(ctx, { body: { schema, url } }).
The Context.dev Convex component includes a search method that queries the web with optional filters and can return results as Markdown. Call it from a Convex action to power RAG pipelines, research agents, or enrichment workflows without managing a separate search API integration.
No. The @context-dot-dev/convex component does not persist any data in Convex. It wraps the Context.dev REST API with typed helpers and isolated component actions. Caching behavior is controlled through API-level parameters such as maxAgeMs on individual requests, not through Convex storage.
Set your Context.dev API key as a Convex environment variable using npx convex env set CONTEXT_DEV_API_KEY your_api_key_here. Then wire the env variable through the component configuration in convex.config.ts using app.use(contextDev, { env: { CONTEXT_DEV_API_KEY: app.env.CONTEXT_DEV_API_KEY } }).
No. The Context.dev component methods must be called from Convex actions, not queries or mutations. This is because they make external HTTP requests to the Context.dev API, which is only permitted inside Convex actions per the Convex execution model.
The retrieveBrand method returns a full brand payload that includes logos, colors, typography, and design system details for a given domain. The retrieveSimplifiedBrand method returns a smaller subset of that payload. The styleguide and fonts methods can be used to extract specific design system details independently.
Yes. The @context-dot-dev/convex package includes retrieveBrandByTicker and retrieveBrandByIsin helper methods for financial identifier lookups. There is also identifyBrandFromTransaction for matching a brand from transaction description text, and retrieveNaics and retrieveSic for industry classification.