Skip to main content
The Pry Team
Pry Engineering
View all authors

Introducing Pry โ€” Self-Hosted Web Scraping with x402 Crypto Payments

ยท 4 min read
The Pry Team
Pry Engineering

Today we're announcing Pry: an adaptive web scraping and browser automation API that refuses to break. Pry pairs a 15-tier anti-bot escalation engine with 109 store-ready Apify Actors and an x402 crypto pay-per-call payment lane โ€” so you can run it yourself, rent it per call, or let AI agents pay for it autonomously.

What is Pry?โ€‹

Pry is a self-hostable scraping engine with a clean REST API and Python SDK. Point it at a URL and it returns clean markdown, structured extraction, screenshots, PDFs, or LLM-ready corpora โ€” across 15 data domains including e-commerce, SEO, crypto market data, jobs, real estate, and compliance screening.

pip install "pry-scraper @ git+https://codeberg.org/RugMunchMedia/pryscraper.git"
from pry import Pry

client = Pry(api_key="your-key") # you set the key โ€” fail-closed auth
result = client.scrape("https://example.com/pricing", render=True)
print(result.markdown)

Because it's self-hosted, you own the data and the infrastructure. There are no per-call fees in the self-hosted lane โ€” you bring your own proxy pool and API keys, and Pry handles the hard part: getting past the bot defenses.

The 15-tier anti-bot engineโ€‹

Most scrapers have one strategy. When it fails, the scrape fails. Pry escalates through 15 adaptive tiers โ€” from plain HTTP, through header and TLS fingerprint rotation, browser rendering, stealth browser profiles, and CAPTCHA-solving, up to distributed residential-proxy strategies. Each tier is tried in order; the engine learns which tier a target requires and remembers it.

The practical effect: a scrape that would break a single-strategy scraper instead costs a few extra seconds, not a failure. The stealth module is licensed under BSL 1.1 (free for personal, academic, and non-commercial use; converts to MIT in 2029) while the core engine is MIT.

109 store-ready Apify Actorsโ€‹

If you'd rather not run infrastructure at all, Pry ships as 109 store-ready Apify Actors โ€” from universal-scraper and site-crawler to price-watcher, lead-harvester, sanctions-screener, and niche monitors like EV charging stations and AI model pricing.

Every actor uses pay-per-event (PPE) billing: you're charged per successfully processed item, never for idle time. Pricing is set by an economics model that verifies margins against real infrastructure costs โ€” break-even math, not vibes. Browse the catalog in the Apify Actors docs.

x402: pay per call, across 7 chainsโ€‹

The third lane is x402 โ€” the HTTP 402 Payment Required protocol that lets clients (especially AI agents) pay for API calls directly from a crypto wallet. No account, no API key: in the x402 lane, the payment is the credential.

Pry accepts payments across seven chains โ€” Base, Ethereum, Arbitrum, Optimism, Polygon (EVM USDC/USDT), Solana (SPL), and TRON (TRC-20) โ€” each with its own CAIP-2-keyed treasury wallet. Settlement is verified on-chain via EIP-3009 transferWithAuthorization, Permit2, or an external facilitator.

curl https://api.pryscraper.com/v1/x402/pricing
# {"scrape": {"price_usd": 0.001, ...}, "crawl": {"price_usd": 0.01, ...}}

An agent that needs one page pays one tenth of a cent. An agent that needs a thousand pays for a bulk crawl. Read the full x402 pay-per-call guide.

Self-host vs cloud hostingโ€‹

Self-hostedHosted (Pro / Team)
CostFree (MIT core)Pro $49/mo, Team $199/mo
DataYours, on your infraManaged, isolated
Anti-botFull 15-tier engineFull 15-tier engine
Best forPrivacy, scale, custom logicTeams that want zero ops

Self-host if you care about data ownership or need deep customization. Subscribe if you'd rather not run proxies and browsers. Either way, the x402 lane is available per-call with no subscription at all.

Get startedโ€‹

Questions or commercial licensing: [email protected].

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.

x402 Payments โ€” How AI Agents Pay for Scraping

ยท 3 min read
The Pry Team
Pry Engineering

AI agents increasingly need to fetch web data: prices, listings, articles, compliance records. But agents can't fill out signup forms or click "confirm email". x402 solves this by making the HTTP status code 402 Payment Required machine-payable: the API asks for crypto, the agent pays from a wallet, and the call proceeds. No account, no API key โ€” in the x402 lane, the payment is the credential.

The x402 protocol in one flowโ€‹

x402 (revived by Coinbase's x402 spec) works like this:

  1. The agent calls a paid endpoint with no payment.
  2. The server responds 402 Payment Required with a PAYMENT-REQUIRED header โ€” a Base64-encoded JSON body containing the receiving wallet, amount, asset, and facilitator.
  3. The agent signs and broadcasts a payment (typically USDC) to that wallet.
  4. The agent submits the transaction to the server, which verifies it on-chain and returns an access token.
  5. The agent replays the token (X-Payment-Id header) until it expires.
curl https://api.pryscraper.com/v1/x402/pricing
# {"scrape": {"price_usd": 0.001}, "crawl": {"price_usd": 0.01}, ...}

Prices are per operation and published at /v1/x402/pricing, so an agent can budget before it spends: one page costs a tenth of a cent, a thousand-page bulk crawl costs ten cents.

EIP-3009: the settlement primitiveโ€‹

On EVM chains, Pry verifies payments via EIP-3009 (transferWithAuthorization) โ€” the USDC standard for gasless, signature-based transfers. The payer signs an authorization; the facilitator (or the server itself, via EIP-7702 self-verify) submits it on-chain. Permit2 and plain native transfers are also supported, so USDT, ARB, ETH, and WETH work alongside USDC.

Verification is real: the transaction is confirmed on-chain before an access token is issued, with a configurable TTL (PRY_X402_PAYMENT_TTL, default 3600s).

Multi-chain treasuries: EVM, Solana, Tronโ€‹

A Solana address can't receive an EVM transfer, so Pry keys receiving wallets by CAIP-2 network id โ€” one treasury per chain family:

PRY_X402_ENABLED=true
PRY_X402_WALLET_BASE=0x... # EVM treasury (shared across EVM chains)
PRY_X402_WALLET_SOLANA=... # distinct base58 address
PRY_X402_WALLET_TRON=... # distinct T-prefix address

Pry accepts payments across seven chains: Base, Ethereum, Arbitrum, Optimism, and Polygon (EVM, USDC/USDT and native assets), Solana (SPL: SOL/USDC/USDT), and TRON (TRC-20: USDT/TRX). EVM settlement is turnkey; Solana runs through an SPL/facilitator verifier; TRON is scaffolded for operators who enable it explicitly.

How agents auto-pay via MCPโ€‹

The friction point for agents is implementing the payment flow. Pry exposes 76 MCP tools, so an agent with an MCP client and a funded wallet can scrape without any bespoke payment code: the tool call returns the 402 challenge, the agent's wallet layer signs the EIP-3009 authorization, and the retry carries the payment. From the agent's perspective it's just another tool call that costs fractions of a cent.

This is the model we expect to win for machine-to-machine APIs: no onboarding funnel, no API-key provisioning, no minimum commitments โ€” just a signed payment per call, settled on-chain.

Try itโ€‹

Commercial licensing and hosted plans: [email protected].