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

@aucra/vercel

v0.1.1

Published

Aucra edge injection for any framework on Vercel via Routing Middleware

Readme

@aucra/vercel

The official Vercel SDK for Aucra — The platform to successfully monetize AI web scrapers and traffic.

This SDK works with any framework on Vercel — Astro, Svelte, Vue, Nuxt, Remix, plain HTML, and more — by deploying as Vercel Routing Middleware.

Installation

npm install @aucra/vercel

Quick Start

1. Create middleware.ts in your project root

// middleware.ts
import { createAucraMiddleware } from '@aucra/vercel';

const aucra = createAucraMiddleware({
  publisherKey: process.env.AUCRA_KEY,
});

export default aucra;

2. Set environment variable

In your Vercel project dashboard, add AUCRA_KEY with your publisher key.

Framework-Specific Setup

Astro

Works with Astro's SSR adapter on Vercel. Create middleware.ts in your project root (same level as astro.config.mjs).

SvelteKit

Works with SvelteKit on Vercel. Create middleware.ts in your src/ directory (or hooks.server.ts for server-only logic).

Nuxt

Works with Nuxt on Vercel. Create middleware.ts at project root - Nuxt will automatically use it.

Vue / Nuxt 3

Same as above.

Remix

Works with Remix on Vercel. Create middleware.ts at project root.

Plain HTML/JS

Works with any static or SSR site on Vercel.

How It Works

  1. Zero Overhead for Humans: When a normal human visits, the middleware passes through immediately with 0ms added latency.
  2. Bot Detection: The middleware checks the User-Agent header against 40+ AI scrapers (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, etc.).
  3. Live Auctions: When a bot is detected, the middleware performs a lightweight Edge fetch to the Aucra SSP API with a 100ms timeout.
  4. Ad Injection: If your publisher key wins an auction, the ad content is injected into the HTML before </body>.

Configuration

createAucraMiddleware({
  // Publisher key (or set AUCRA_KEY env var)
  publisherKey: process.env.AUCRA_KEY,

  // Optional: Custom SSP endpoint
  sspUrl: 'https://your-ssp-endpoint.com/v1/edge/auction',

  // Optional: SSP call timeout in ms (default: 100)
  timeoutMs: 100,
})

Live Vercel Logs

The SDK prints detailed runtime traces. Open Vercel Dashboard → Logs to watch:

========================================
[AUCRA] Edge Auction Request Initiated
[AUCRA] URL Executing: https://your-domain.com/
[AUCRA] AI agent detected — UA="Mozilla/5.0 ... PerplexityBot/1.0"
[AUCRA] Calling SSP: https://aucra-ssp-api...
[AUCRA] Auction Result: WINNER FOUND!
[AUCRA] Ad Text: "Try Aucra - Monetize your AI traffic"
========================================

Detected AI Bots

  • OpenAI: GPTBot, ChatGPT-User, ChatGPT-Agent
  • Anthropic: ClaudeBot, Claude-Web, Claude-User
  • Google: Google-Extended, Googlebot-Extended, GoogleOther, Vertex AI
  • Perplexity: PerplexityBot, Perplexity-User
  • Meta: Meta-ExternalAgent, Meta-ExternalFetcher
  • Apple: Applebot-Extended
  • Amazon: Amazonbot
  • Cohere: cohere-ai, cohere-training-data-crawler
  • ByteDance: Bytespider
  • Exa/Linkup: ExaBot, LinkupBot
  • Firecrawl: FirecrawlAgent, webzio-extended
  • Apify: ApifyWebsiteContentCrawler
  • And 30+ more...

Comparison: @aucra/next vs @aucra/vercel

| Aspect | @aucra/next | @aucra/vercel | |--------|-------------|---------------| | Frameworks | Next.js only | Any framework on Vercel | | Integration | React component in layout | middleware.ts at root | | API | next/headers() | Standard Web APIs | | React Required | Yes | No | | SDK Type | React Server Component | Edge Middleware |

Developer Notes

This package is framework-agnostic TypeScript. To build before publishing:

npm install
npm run build   # compiles TS → dist/

The source is in src/middleware.ts, output is in dist/.

Publishing

GitHub Actions CI/CD pipeline. To publish:

  1. Commit changes to main branch
  2. npm version patch (or minor/major)
  3. git push --follow-tags
  4. GitHub Action builds and publishes to NPM automatically