Context
Bijection component for calling the Context.dev API from Bijection functions.
git clone https://github.com/bijectionhq/context.git
cd context
git checkout 66af2f57cff6d1df606baf696c0813363231f774Bijection repository access is required. Request access.
Description
Bijection component for calling the Context.dev API from Bijection functions.
Explore the package README for API concepts, configuration, and examples. Check the Bijection source for adaptation-specific setup.
Review the source and its dependencies before adopting this package. Source availability does not establish npm publication or runtime qualification.
Getting started
- Get the source at the revision above and read its package documentation.
- Check the required Bijection SDK version, dependencies, and external service credentials.
- Follow the package setup instructions and the guide to using components.
- Exercise the component in your deployment according to your project’s verification rules.
Open source
Maintained source: bijectionhq/context. Based on context-dot-dev/convex-component. License: MIT. Consult the repository for license terms, notices, and contributor attribution.
From the upstream publisher
Convex component for calling the Context.dev API from Convex functions.
Explore the demo ↗Upstream overview
From the upstream package documentation.
Context.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.
Use cases
From the upstream package documentation.
- Fetching a company's brand assets, logo, and metadata by domain or email without scraping the web yourself
- Extracting structured data from arbitrary URLs using a schema you define, replacing ad-hoc HTML parsing
- Running web searches or AI queries against a domain from within a Convex action as part of a data enrichment pipeline
- Crawling a site to collect content for RAG ingestion or content indexing workflows
- Classifying businesses by NAICS industry code from free-form input in a backend action
How it works
From the upstream package documentation.
After installing the package and registering it in your convex.config.ts with app.use(contextDev, { env: { CONTEXT_DEV_API_KEY } }), the component's actions become available under components.contextDev. All calls happen inside Convex actions, since the component makes outbound HTTP requests to the Context.dev API.
You can call the component two ways. The raw action groups like components.contextDev.brand.retrieve or components.contextDev.web.scrapeMarkdown can be invoked via ctx.runAction. Alternatively, instantiate the typed helper client with new ContextDev(components.contextDev) and call methods like contextDev.scrapeMarkdown(ctx, { params: { url } }) or contextDev.extract(ctx, { body: { url, schema } }) with full TypeScript types derived from the Context.dev OpenAPI spec.
GET endpoints accept a params object; POST endpoints accept a body object and optionally params for query parameters. The component validates both input arguments and API responses at runtime using Convex validators before returning data to your function.
For testing, the package exports contextDevTest.register(t) for use with convex-test, which mounts the component in test environments without duplicating component internals.
Upstream package FAQ
Does the Context.dev Convex component store scraped data in the Convex database?
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.
How do I authenticate the Context.dev component with my API key?
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 } }).
Can I call Context.dev component actions from Convex queries or mutations?
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.
What brand data fields does the Context.dev Convex component return?
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.
Does the Context.dev Convex component support looking up companies by stock ticker or ISIN?
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.
Use with agents and CLI
Give your coding agent the component’s source identity and setup guidance.
Help me integrate Context with Bijection.
Read: https://bijection.com/components/context/SKILL.md
Check SDK compatibility and dependency availability.
Follow this project's execution and verification rules.Upstream README.md
View repository ↗Documentation from context-dot-dev/convex-component, recorded October 23, 2026. APIs and setup may differ in the Bijection adaptation.
Context.dev Convex Component
Use the Context.dev API from Convex actions through an isolated Convex component.
This package is generated against openapispec.json and exposes thin wrappers for the Context.dev REST API. It does not persist data in Convex; Context.dev caching behavior is controlled through the API parameters such as maxAgeMs.
Install
npm install @context-dot-dev/convex
Add the component to your Convex app:
import contextDev from "@context-dot-dev/convex/convex.config";
import { defineApp } from "convex/server";
import { v } from "convex/values";
const app = defineApp({
env: {
CONTEXT_DEV_API_KEY: v.string(),
},
});
app.use(contextDev, {
env: {
CONTEXT_DEV_API_KEY: app.env.CONTEXT_DEV_API_KEY,
},
});
export default app;
Set CONTEXT_DEV_API_KEY on the Convex deployment, then run:
npx convex dev
Usage
You can call the component API directly from Convex actions:
import { v } from "convex/values";
import { components } from "./_generated/api.js";
import { action } from "./_generated/server.js";
export const brand = action({
args: { domain: v.string() },
handler: async (ctx, args) => {
return await ctx.runAction(components.contextDev.brand.retrieve, {
params: { domain: args.domain },
});
},
});
Or use the typed helper client:
import { ContextDev } from "@context-dot-dev/convex";
import { v } from "convex/values";
import { components } from "./_generated/api.js";
import { action } from "./_generated/server.js";
const contextDev = new ContextDev(components.contextDev);
export const scrape = action({
args: { url: v.string() },
handler: async (ctx, args) => {
return await contextDev.scrapeMarkdown(ctx, {
params: { url: args.url },
});
},
});
API Shape
GET endpoints take params; POST endpoints take body and may also take params if the OpenAPI operation defines query parameters.
The helper client types params, body, and returned data from openapispec.json:
contextDev.retrieveBrand(ctx, { params: { domain } })contextDev.retrieveBrandByName(ctx, { params: { company_name } })contextDev.retrieveBrandByEmail(ctx, { params: { email } })contextDev.identifyBrandFromTransaction(ctx, { params: { transaction_info } })contextDev.scrapeMarkdown(ctx, { params: { url } })contextDev.crawl(ctx, { body: { url, maxPages } })contextDev.extract(ctx, { body: { url, schema } })contextDev.search(ctx, { body: { query } })contextDev.aiQuery(ctx, { body: { domain, data_to_extract } })contextDev.extractProducts(ctx, { body: { domain } })contextDev.retrieveNaics(ctx, { params: { input } })
The component actions also validate their runtime argument shapes with Convex validators. For example, components.contextDev.web.scrapeMarkdown requires params.url, while components.contextDev.web.search requires body.query. API responses are validated as JSON objects before they are returned to your Convex function.
Raw component action groups are available under:
components.contextDev.brandcomponents.contextDev.webcomponents.contextDev.aicomponents.contextDev.industrycomponents.contextDev.people
Testing
The package includes a convex-test registration helper so app tests can mount the component without duplicating component internals:
import { convexTest } from "convex-test";
import { describe, expect, it } from "vitest";
import schema from "./schema.js";
import { api } from "./_generated/api.js";
import contextDevTest from "@context-dot-dev/convex/test";
describe("Context.dev usage", () => {
it("registers the Context.dev component", async () => {
const t = convexTest(schema);
contextDevTest.register(t);
// Call your app functions that use components.contextDev here.
// await t.action(api.myModule.myAction, { domain: "context.dev" });
});
});
The test entrypoint also exports schema and modules for tests that need to customize component registration.
Development
npm install
npm run build
npm run typecheck
npm run build regenerates TypeScript types from openapispec.json and compiles the package.
After configuring a real Convex deployment, run npm run codegen to refresh the component generated files from Convex itself.