@context-dot-dev/convex component calls Context.dev from your Convex backend with typed inputs and responses. This guide starts with a page scrape; the same client supports company lookups and other API operations.
View Context.dev for Convex
Open the component listing, package links, and current method catalog.
Prerequisites
- An existing Convex project
- A Context.dev account and a secret key from the dashboard
Install and configure
1
Install the package
2
Register the component
Add the component and its environment contract to
convex/convex.config.ts:3
Set the deployment secret
Set the key interactively so it does not appear in shell history, then start Convex development:Convex environment variables are deployment-specific. Set the same variable separately for production, using the
--prod option, before deploying.Call Context.dev from an action
Create a shared typed client and call it inside a Convex action. For example, addconvex/context.ts:
markdown field to confirm the action reached Context.dev.
Context.dev methods must run in Convex actions because they make external HTTP requests. Do not call the component directly from a query or mutation.
Common methods
GET-backed helpers take
params. POST-backed helpers take body and may also take params when the operation defines query parameters. TypeScript infers both the arguments and responses from the component.
Data and caching
The component returns API results to your action but does not persist them in Convex. Store a result in your own tables only when your application needs it. Context.dev controls upstream caching through request parameters such asmaxAgeMs.
Troubleshooting
Reference
Component source
README, helper methods, generated bindings, examples, and tests.
npm package
Published package versions and install metadata.
Convex components
How components are installed, configured, and called.
Context.dev API quickstart
Authentication, endpoint behavior, and API examples.