npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@context-dot-dev/convex

v1.0.1

Published

Convex component for calling the Context.dev API from Convex functions.

Downloads

4,549

Readme

Convex Component

Context.dev Convex Component

Call the Context.dev API from your Convex actions. This component wraps the Context.dev REST API with typed helpers and isolated component actions—no data is stored in Convex.

Prerequisites

Install

npm install @context-dot-dev/convex

Setup

Add the component to your Convex app config and wire your API key through component env:

import contextDev from "@context-dot-dev/convex/convex.config.js";
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 your Convex deployment:

npx convex env set CONTEXT_DEV_API_KEY your_api_key_here
npx convex dev

Usage

Typed helper client (recommended)

Create a shared client and call it from your actions:

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 brand = action({
  args: { domain: v.string() },
  handler: async (ctx, args) => {
    return await contextDev.retrieveBrand(ctx, {
      params: { domain: args.domain },
    });
  },
});

export const scrapeMarkdown = action({
  args: { url: v.string() },
  handler: async (ctx, args) => {
    return await contextDev.scrapeMarkdown(ctx, {
      params: { url: args.url },
    });
  },
});

Direct component actions

You can also call component actions directly with ctx.runAction:

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 },
    });
  },
});

API reference

GET endpoints take params. POST endpoints take body and may also take params when the operation defines query parameters. Responses are validated as JSON before being returned to your function.

Helper methods

| Method | Description | | --- | --- | | scrapeHtml | Scrape a URL and return raw HTML | | scrapeMarkdown | Scrape a URL and return Markdown | | scrapeImages | Extract image references from a page | | crawlSitemap | Crawl a domain sitemap | | crawl | Crawl a site and return Markdown pages | | extract | Crawl pages and extract structured data from a JSON schema | | search | Search the web with optional filters and Markdown extraction | | competitors | Find direct competitors for a domain | | styleguide | Extract colors, typography, and design system details | | fonts | Extract font usage and font asset links | | screenshot | Capture a website screenshot | | retrieveBrand | Retrieve full brand data by domain | | retrieveBrandByName | Retrieve brand data by company name | | retrieveBrandByEmail | Retrieve brand data from a business email | | retrieveBrandByTicker | Retrieve brand data by stock ticker | | retrieveBrandByIsin | Retrieve brand data by ISIN | | identifyBrandFromTransaction | Identify a brand from transaction text | | retrieveSimplifiedBrand | Retrieve a smaller brand payload | | prefetchBrand | Queue brand prefetching by domain | | prefetchBrandByEmail | Queue brand prefetching by email | | retrievePerson | Retrieve a person profile from supported identifiers | | retrieveNaics | Classify a company into NAICS codes | | retrieveSic | Classify a company into SIC codes | | aiQuery | Extract custom AI-defined datapoints from a website | | extractProduct | Extract product data from a product page URL | | extractProducts | Extract product listings from a domain or URL |

Component action groups

Raw component actions are available under:

  • components.contextDev.brand
  • components.contextDev.web
  • components.contextDev.ai
  • components.contextDev.industry
  • components.contextDev.people

Argument and response types are inferred from the Context.dev OpenAPI spec, so your editor will autocomplete params and body fields.

Caching

This component does not persist data in Convex. Context.dev caching is controlled through API parameters such as maxAgeMs on individual requests.

Learn more