Pp apify

From mvanhorn/printing-press-library · View interactive version

Pp apify is an AI agent skill from the GitHub repository mvanhorn/printing-press-library. Every Apify platform feature, plus a local SQLite store, cross-Actor search, novelty diffing, cost-aware runs, and... Trigger phrases: `scrape twitter for AI mentions`, `run apify actor`, `what's new in my reddit scraper`, `build a newsletter from this week's scrapes`, `how much did my apify scrapes

How to use this skill

Skill file

<!-- GENERATED FILE — DO NOT EDIT.

This file is a verbatim mirror of library/developer-tools/apify/SKILL.md,

regenerated post-merge by tools/generate-skills/. Hand-edits here are

silently overwritten on the next regen. Edit the library/ source instead.

See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->

Apify — Printing Press CLI

Prerequisites: Install the CLI

This skill drives the apify-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer. It defaults binaries to $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:

```bash

npx -y @mvanhorn/printing-press-library install apify --cli-only

```

  1. Verify: apify-pp-cli --version
  2. Ensure the reported install directory is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer):

go install github.com/mvanhorn/printing-press-library/library/developer-tools/apify/cmd/apify-pp-cli@latest

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

When to Use This CLI

Reach for apify-pp-cli when you need to orchestrate multiple Apify Actors as part of a recurring research, scraping, or newsletter pipeline. It's the right tool when you want per-run cost visibility, novel-only output, cross-Actor search, or schedule-as-code. For Actor development (writing your own scrapers), use the official apify-cli; this CLI is for platform operators.

Unique Capabilities

These capabilities aren't available in any other tool for this API.

Local state that compounds

_Reach for this when you need 'what's new since last run' across recurring scrapes for a newsletter or alert workflow._

```bash

apify-pp run trudax/reddit-scraper --input @sub-list.json --only-new --format markdown

```

_Use this when you want 'what did anyone say about X this week' without juggling 8 dataset IDs._

```bash

apify-pp search "model context protocol" --since 7d --actors twitter,reddit,hn --json --select url,title,source_actor

```

_Use this while tuning templates or dedupe heuristics so iteration is free._

```bash

apify-pp digest --offline --topic AI --since 7d --template draft.tmpl

```

Cost discipline

_Reach for this whenever the user asks 'why is my Apify bill so high' or 'which Actor costs most per useful item.'_

```bash

apify-pp cost report --since 30d --group-by actor,schedule --json

```

_Use this on any long-tail or untrusted Actor to fail-closed on cost rather than learning about it on the invoice._

```bash

apify-pp-cli run xquik/x-tweet-scraper --input @xquik-tweets.json --max-cost 0.50 --wait

```

_Reach for this whenever the user wonders 'is the cheaper Actor good enough' before committing to a recurring schedule._

```bash

apify-pp ab run apidojo/tweet-scraper kaitoeasyapi/twitter-x-data-tweet-scraper-pay-per-result-cheapest --input shared.json --judge novelty --json

```

Newsletter workflows

_Use this as the last step of any newsletter / weekly report workflow; output is ready to paste into Beehiiv or pipe to a writer agent._

```bash

apify-pp digest --topic "AI dev tools" --since 24h --template weekly.tmpl

```

_Use this when the user wants a recurring 'fire one command, get the newsletter' pipeline rather than orchestrating Actor calls by hand._

```bash

apify-pp workflow run ./weekly-newsletter.yaml --json

```

GitOps

_Reach for this when the user manages 3+ schedules and wants them version-controlled._

```bash

apify-pp schedule apply ./schedules.yaml --dry-run && apify-pp schedule diff

```

Repeatability

_Use this to stop hand-rebuilding input JSON every time you re-run a recurring scrape._

```bash

apify-pp preset save twitter weekly-ai --from-run abc123 && apify-pp call twitter --preset weekly-ai --override startUrls=@new-list.txt

```

Command Reference

actor-builds — The API endpoints described in this section enable you to manage, and delete Apify Actor builds.

Note that if any returned build object contains usage in dollars, your effective

unit pricing at the time of query has been used for computation of this dollar equivalent, and hence it should be

used only for informative purposes.

You can learn more about platform usage in the documentation.

actor-runs — The API endpoints described in this section enable you to manage, and delete Apify Actor runs.

If any returned run object contains usage in dollars, your effective unit pricing at the time of query

has been used for computation of this dollar equivalent, and hence it should be used only for informative purposes.

For completed runs, aggregated fields such as stats or dollar usage totals are eventually consistent and update within a few seconds. For values that must match finalized totals, wait about 10 seconds after the run completed, then fetch the run again.

You can learn more about platform usage in the documentation.

actor-tasks — The API endpoints described in this section enable you to create, manage, delete, and run Apify Actor tasks.

For more information, see the Actor tasts documentation.

:::note

For all the API endpoints that accept the actorTaskId parameter to

specify a task, you can pass either the task ID (e.g. HG7ML7M8z78YcAPEB) or a tilde-separated

username of the task's owner and the task's name (e.g. janedoe~my-task).

:::

Some of the API endpoints return run objects. If any such run object

contains usage in dollars, your effective unit pricing at the time of query

has been used for computation of this dollar equivalent, and hence it should be

used only for informative purposes.

You can learn more about platform usage in the documentation.

acts — Manage acts

browser-info — Manage browser info

datasets — Manage datasets

key-value-stores — Manage key value stores

logs — The API endpoints described in this section are used the download the logs

generated by Actor builds and runs. Note that only the trailing 5M characters

of the log are stored, the rest is discarded.

:::note

Note that the endpoints do not require the authentication token, the calls

are authenticated using a hard-to-guess ID of the Actor build or run.

:::

request-queues — Manage request queues

schedules — This section describes API endpoints for managing schedules.

Schedules are used to automatically start your Actors at certain times. Each schedule

can be associated with a number of Actors and Actor tasks. It is also possible

to override the settings of each Actor (task) similarly to when invoking the Actor

(task) using the API.

For more information, see Schedules documentation.

Each schedule is assigned actions for it to perform. Actions can be of two types

For details, see the documentation of the Get schedule endpoint.

store — Apify Store is home to thousands of public Actors available

to the Apify community.

The API endpoints described in this section are used to retrieve these Actors.

:::note

These endpoints do not require the authentication token.

:::

tools — The API endpoints described in this section provide utility tools for encoding,

signing, and verifying data, as well as inspecting HTTP request details.

users — The API endpoints described in this section return information about user accounts.

webhook-dispatches — Manage webhook dispatches

webhooks — Webhook-related API endpoints for configuring automated notifications.

Finding the right command

When you know what you want to do but not which command does it, ask the CLI directly:

apify-pp-cli which "<capability in your own words>"

which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.

Recipes

Weekly newsletter scrape

apify-pp workflow run ./weekly-newsletter.yaml --agent

One YAML-declared chain across Twitter + Reddit + HN + News scrapers; emits a single newsletter-ready digest.

Xquik Tweet research

Use Xquik's X Tweet Scraper

for tweet search, timelines, threads, replies, quotes, and engagement.

Create xquik-tweets.json:

{
  "searchTerms": ["from:OpenAI API", "#AI lang:en"],
  "maxItems": 100,
  "maxItemsPerTarget": 50,
  "outputVariant": "rich"
}
apify-pp-cli run xquik/x-tweet-scraper --input @xquik-tweets.json --max-cost 0.50 --wait --agent

maxItems caps the run. maxItemsPerTarget balances explicit targets.

Xquik audience research

Use Xquik's X Follower Scraper

for followers, following, verified followers, lists, and communities.

Create xquik-followers.json:

{
  "twitterHandles": ["OpenAI", "AnthropicAI"],
  "relations": ["followers", "verified_followers"],
  "maxItems": 100,
  "maxItemsPerTarget": 50,
  "outputMode": "compact",
  "includeTargetMetadata": true,
  "dedupeMode": "merge"
}
apify-pp-cli run xquik/x-follower-scraper --input @xquik-followers.json --max-cost 0.50 --wait --agent

Keep target metadata for multi-target runs. Use merge deduplication for audience overlap.

maxItemsPerTarget optionally balances results across targets.

Check each Actor's live Store schema and pricing before a paid run.

The CLI projects from local history. --wait adds a live watchdog.

Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.

Cross-Actor topic search (compact)

apify-pp search 'agent' --since 30d --agent --select url,title,source_actor,published_at

FTS5 over the local store; use --select with dotted paths to avoid pulling the full normalized item payload.

Schedule drift check

apify-pp schedule diff --agent

Terraform-style diff between local YAML and the live Apify schedules; output is a JSON change set.

A/B test two Twitter scrapers

apify-pp ab run apidojo/tweet-scraper kaitoeasyapi/twitter-x-data-tweet-scraper-pay-per-result-cheapest --input shared.json --judge cost-per-novel --agent

Runs both, normalizes via unified schema, reports cost-per-novel-item and overlap %.

Auth Setup

Set APIFY_TOKEN (from Apify Console → Settings → Integrations) or run apify-pp auth set-token. The CLI validates the token against /v2/users/me before any call. The query-param ?token= form is supported but discouraged.

Run apify-pp-cli doctor to verify setup.

Agent Mode

Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.

```bash

apify-pp-cli actor-builds get --agent --select id,name,status

```

Response envelope

Commands that read from the local store or the API wrap output in a provenance envelope:

{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}

Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal AND no machine-format flag (--json, --csv, --compact, --quiet, --plain, --select) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.

Agent Feedback

When you (or the agent) notice something off about this CLI, record it:

apify-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
apify-pp-cli feedback --stdin < notes.txt
apify-pp-cli feedback list --json --limit 10

Entries are stored locally at ~/.apify-pp-cli/feedback.jsonl. They are never POSTed unless APIFY_FEEDBACK_ENDPOINT is set AND either --send is passed or APIFY_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.

Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.

Output Delivery

Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:

| Sink | Effect |

|------|--------|

| stdout | Default; write to stdout only |

| file:<path> | Atomically write output to <path> (tmp + rename) |

| webhook:<url> | POST the output body to the URL (application/json or application/x-ndjson when --compact) |

Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.

Named Profiles

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.

apify-pp-cli profile save briefing --json
apify-pp-cli --profile briefing actor-builds get
apify-pp-cli profile list --json
apify-pp-cli profile show briefing
apify-pp-cli profile delete briefing --yes

Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.

Exit Codes

| Code | Meaning |

|------|---------|

| 0 | Success |

| 2 | Usage error (wrong arguments) |

| 3 | Resource not found |

| 4 | Authentication required |

| 5 | API error (upstream issue) |

| 7 | Rate limited (wait and retry) |

| 10 | Config error |

Argument Parsing

Parse $ARGUMENTS:

  1. Empty, help, or --help → show apify-pp-cli --help output
  2. Starts with install → ends with mcp → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with --agent)

MCP Server Installation

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:

claude mcp add apify-pp-mcp -- apify-pp-mcp

Verify: claude mcp list

Direct Use

  1. Check if installed: which apify-pp-cli

If not found, offer to install (see Prerequisites at the top of this skill).

  1. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  2. Execute with the --agent flag:

```bash

apify-pp-cli <command> [subcommand] [args] --agent

```

  1. If ambiguous, drill into subcommand help: apify-pp-cli <command> --help.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.