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

actor-spec

v0.5.0

Published

Publish your Apify Actors on other platforms. Define once, run anywhere.

Downloads

40

Readme

actor-spec

Publish your Apify Actors on other platforms. Define once, run anywhere.

Apify actors are powerful, but they lock your scraper definitions to one platform.

If you want to self-host, migrate to another provider, or run the same actor across multiple environments, there is no standard way to describe what an actor is outside of Apify's ecosystem.

actor-spec is a platform-agnostic schema for actor metadata -- features, pricing, performance, datasets, privacy compliance -- expressed as TypeScript types. Describe your actors once.

npm install actor-spec

Quick start

Define an actor spec in TypeScript:

// actorspec.ts
import type { ScraperActorSpec } from 'actor-spec';

const spec: ScraperActorSpec = {
  actorspecVersion: 1,
  actor: {
    title: 'Product Scraper',
    publicUrl: 'https://apify.com/my-org/product-scraper',
    shortDesc: 'Extracts product data from example.com',
    datasetOverviewImgUrl: null,
  },
  platform: {
    name: 'apify',
    url: 'https://apify.com',
    authorId: 'my-org',
    authorProfileUrl: 'https://apify.com/my-org',
    actorId: 'product-scraper',
  },
  authors: [{ name: 'Jane', email: '[email protected]', authorUrl: null }],
  websites: [{ name: 'Example Store', url: 'https://example.com' }],
  pricing: {
    pricingType: 'none',
    value: 0,
    currency: 'usd',
    period: 0,
    periodUnit: '',
  },
  datasets: [
    // Dataset definitions with filters, modes, perf stats, privacy...
  ],
};

export default spec;

Compile it to JS, then point the CLI at the compiled output:

npx actor-spec gen --config ./dist/actorspec.js

This generates actorspec.json inside .actor/.

If there is no .actor/ directory, the file is saved to the current dir.

Why actor-spec?

Move actors off Apify -- or run them on both.

The spec captures everything about an actor in a single file: what it does, what data it extracts, how fast it runs, what it costs. That definition is yours, independent of any platform.

Self-host with confidence.

When you self-host an actor, you lose Apify's metadata layer. actor-spec replaces it. Your tooling can read actorspec.json to discover datasets, validate configs, and generate documentation -- no platform required.

Autocomplete for every field.

TypeScript types cover the full schema: actor metadata, dataset features, scraper modes, perf stats, fault tolerance, and privacy fields. Your IDE fills in the rest.

Compare actors across platforms.

Structured performance data (DatasetPerfStat) and feature flags (DatasetFeatures) make it possible to programmatically compare scrapers on cost, speed, and capabilities -- even when they run on different infrastructure.

Track privacy compliance.

Each dataset declares which fields contain personal data, whether that data is redacted, and which groups of people are affected. The same compliance metadata applies regardless of where the actor runs.

CLI

npx actor-spec gen --config ./dist/actorspec.js

gen

Generate actorspec.json from a compiled JS config module.

| Flag | Required | Description | | ---------------------- | -------- | -------------------------------------------------------------------------------------- | | -c, --config <path> | Yes | Path to the compiled JS config file. | | -o, --out-dir [path] | No | Output directory. Defaults to .actor/ if it exists, otherwise the current directory. | | -s, --silent | No | Suppress log output. |

The config file must have a default export -- either an ActorSpec object or an async function that returns one.

Documentation

| Document | Description | | ----------------------------------------- | ----------------------------------- | | API reference | Auto-generated TypeScript API docs. | | Changelog | Release history. |

License

MIT