Skip to main content

One post tagged with "Apify"

Apify Actors, the Actor Factory, and pay-per-event billing

View All Tags

Building 109 Store-Ready Apify Actors with the Pry Actor Factory

ยท 3 min read
The Pry Team
Pry Engineering

Pry ships 109 store-ready Apify Actors. Hand-writing 109 actor packages โ€” each with spec files, a Dockerfile, pay-per-event wiring, and a store listing โ€” would be a maintenance nightmare. So we didn't. Every actor is generated from a single declarative spec by the open-source Actor Factory.

One spec, a complete actorโ€‹

An ActorSpec describes what the actor does and how it's priced. The factory generates everything else:

from pathlib import Path

from actor_factory import ActorSpec, PricingEvent, generate_actor

spec = ActorSpec(
name="price-watcher",
title="Price Watcher",
description="Track e-commerce prices with change detection.",
version="1.0",
pricing_events=(
PricingEvent(
name="price-captured",
title="Price captured",
description="One product price captured.",
price_usd=0.001,
),
),
)
generate_actor(spec, Path("actors/price-watcher"))

The output is a complete .actor package: Apify spec files, Dockerfile, PPE runtime that emits events only on successful processing, and a store-ready README. Generated actors pass Apify's automated quality gates on the first publish.

PPE pricing with an economics modelโ€‹

Pay-per-event pricing is easy to get wrong: price too high and nobody runs the actor; too low and every run loses money. The factory includes an economics model that computes break-even pricing from real inputs โ€” proxy bandwidth, browser minutes, LLM tokens, and Apify's platform fees โ€” then applies a margin.

Two synthetic events (apify-actor-start, apify-default-dataset-item) are billed by the platform automatically; the model accounts for them so the listed per-item prices stay honest. The result: prices from $0.001 to $0.003 per event, verified against cost, not guessed.

The 15 new market-gap actorsโ€‹

The latest batch targets niches with no first-class Apify coverage โ€” places where demand exists but the store has nothing good:

  • App store ranks โ€” Apple App Store + Google Play rankings, reviews, ASO signals
  • AI model pricing โ€” LLM API price tracking across providers
  • GPU cloud prices โ€” GPU instance pricing across cloud providers
  • EV charging stations โ€” locations, pricing, availability
  • Insurance rates โ€” public quote and rate signals
  • Ticket resale โ€” secondary-market event ticket price monitoring
  • โ€ฆplus market-intel, pricing/rate, and data-pipeline niches

Each of these went through the same pipeline: define the spec, let the economics model set PPE prices, generate, and publish. Total authoring cost per actor: one spec file.

Generate and publishโ€‹

The full loop:

# 1. Define your spec (see above), then generate
python -m actor_factory.cli generate actors/price-watcher

# 2. Test locally
cd actors/price-watcher && apify run

# 3. Publish to the Apify Store
apify push

Because every actor shares the same generated skeleton, a fix to the PPE runtime or the anti-bot tier selection propagates to the whole catalog with a regeneration โ€” 109 actors, one source of truth.

Build your ownโ€‹

The Actor Factory is open source under the Pry repo. If you need an actor we don't ship, define a spec and generate it โ€” or email us and we'll add it to the catalog.