<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="atom.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://docs.pryscraper.com/blog</id>
    <title>Pry Docs Blog</title>
    <updated>2026-08-31T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://docs.pryscraper.com/blog"/>
    <subtitle>Pry Docs Blog</subtitle>
    <icon>https://docs.pryscraper.com/img/favicon.ico</icon>
    <entry>
        <title type="html"><![CDATA[Introducing Pry — Self-Hosted Web Scraping with x402 Crypto Payments]]></title>
        <id>https://docs.pryscraper.com/blog/introducing-pry</id>
        <link href="https://docs.pryscraper.com/blog/introducing-pry"/>
        <updated>2026-08-31T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Today we're announcing Pry: an adaptive web scraping and browser]]></summary>
        <content type="html"><![CDATA[<p>Today we're announcing <strong>Pry</strong>: an adaptive web scraping and browser
automation API that refuses to break. Pry pairs a 15-tier anti-bot
escalation engine with <strong>109 store-ready Apify Actors</strong> and an
<strong>x402 crypto pay-per-call</strong> payment lane — so you can run it yourself,
rent it per call, or let AI agents pay for it autonomously.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-is-pry">What is Pry?<a href="https://docs.pryscraper.com/blog/introducing-pry#what-is-pry" class="hash-link" aria-label="Direct link to What is Pry?" title="Direct link to What is Pry?" translate="no">​</a></h2>
<p>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.</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#F8F8F2"><span class="token plain">pip install "pry-scraper @ git+https://codeberg.org/RugMunchMedia/pryscraper.git"</span><br></div></code></pre></div></div>
<div class="language-python codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-python codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">from</span><span class="token plain"> pry </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">import</span><span class="token plain"> Pry</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">client </span><span class="token operator">=</span><span class="token plain"> Pry</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">api_key</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"your-key"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain">  </span><span class="token comment" style="color:rgb(98, 114, 164)"># you set the key — fail-closed auth</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">result </span><span class="token operator">=</span><span class="token plain"> client</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">scrape</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">"https://example.com/pricing"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> render</span><span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">print</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">result</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token plain">markdown</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><br></div></code></pre></div></div>
<p>Because it's self-hosted, <strong>you own the data and the infrastructure</strong>.
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.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-15-tier-anti-bot-engine">The 15-tier anti-bot engine<a href="https://docs.pryscraper.com/blog/introducing-pry#the-15-tier-anti-bot-engine" class="hash-link" aria-label="Direct link to The 15-tier anti-bot engine" title="Direct link to The 15-tier anti-bot engine" translate="no">​</a></h2>
<p>Most scrapers have one strategy. When it fails, the scrape fails. Pry
escalates through <strong>15 adaptive tiers</strong> — 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.</p>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="109-store-ready-apify-actors">109 store-ready Apify Actors<a href="https://docs.pryscraper.com/blog/introducing-pry#109-store-ready-apify-actors" class="hash-link" aria-label="Direct link to 109 store-ready Apify Actors" title="Direct link to 109 store-ready Apify Actors" translate="no">​</a></h2>
<p>If you'd rather not run infrastructure at all, Pry ships as <strong>109
store-ready Apify Actors</strong> — from <code>universal-scraper</code> and
<code>site-crawler</code> to <code>price-watcher</code>, <code>lead-harvester</code>, <code>sanctions-screener</code>,
and niche monitors like EV charging stations and AI model pricing.</p>
<p>Every actor uses <strong>pay-per-event (PPE) billing</strong>: 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
<a class="" href="https://docs.pryscraper.com/docs/apify">Apify Actors docs</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="x402-pay-per-call-across-7-chains">x402: pay per call, across 7 chains<a href="https://docs.pryscraper.com/blog/introducing-pry#x402-pay-per-call-across-7-chains" class="hash-link" aria-label="Direct link to x402: pay per call, across 7 chains" title="Direct link to x402: pay per call, across 7 chains" translate="no">​</a></h2>
<p>The third lane is <strong>x402</strong> — the HTTP <code>402 Payment Required</code> 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, <em>the payment
is the credential</em>.</p>
<p>Pry accepts payments across <strong>seven chains</strong> — 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 <code>transferWithAuthorization</code>, Permit2, or
an external facilitator.</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#F8F8F2"><span class="token plain">curl https://api.pryscraper.com/v1/x402/pricing</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"># {"scrape": {"price_usd": 0.001, ...}, "crawl": {"price_usd": 0.01, ...}}</span><br></div></code></pre></div></div>
<p>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
<a class="" href="https://docs.pryscraper.com/docs/x402/pay-per-call">x402 pay-per-call guide</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="self-host-vs-cloud-hosting">Self-host vs cloud hosting<a href="https://docs.pryscraper.com/blog/introducing-pry#self-host-vs-cloud-hosting" class="hash-link" aria-label="Direct link to Self-host vs cloud hosting" title="Direct link to Self-host vs cloud hosting" translate="no">​</a></h2>
<table><thead><tr><th></th><th>Self-hosted</th><th>Hosted (Pro / Team)</th></tr></thead><tbody><tr><td>Cost</td><td>Free (MIT core)</td><td>Pro $49/mo, Team $199/mo</td></tr><tr><td>Data</td><td>Yours, on your infra</td><td>Managed, isolated</td></tr><tr><td>Anti-bot</td><td>Full 15-tier engine</td><td>Full 15-tier engine</td></tr><tr><td>Best for</td><td>Privacy, scale, custom logic</td><td>Teams that want zero ops</td></tr></tbody></table>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="get-started">Get started<a href="https://docs.pryscraper.com/blog/introducing-pry#get-started" class="hash-link" aria-label="Direct link to Get started" title="Direct link to Get started" translate="no">​</a></h2>
<ul>
<li class="">Read the <a class="" href="https://docs.pryscraper.com/docs/getting-started/installation">quick start</a></li>
<li class="">Browse the <a class="" href="https://docs.pryscraper.com/docs/apify">109 Apify Actors</a></li>
<li class="">Wire up <a class="" href="https://docs.pryscraper.com/docs/x402/pay-per-call">x402 payments</a></li>
<li class="">Source code: <a href="https://codeberg.org/RugMunchMedia/pryscraper" target="_blank" rel="noopener noreferrer" class="">Codeberg</a></li>
</ul>
<p>Questions or commercial licensing: <a href="mailto:biz@pryscraper.com" target="_blank" rel="noopener noreferrer" class="">biz@pryscraper.com</a>.</p>]]></content>
        <author>
            <name>The Pry Team</name>
            <uri>https://pryscraper.com</uri>
        </author>
        <category label="Announcements" term="Announcements"/>
        <category label="Scraping" term="Scraping"/>
        <category label="x402" term="x402"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Building 109 Store-Ready Apify Actors with the Pry Actor Factory]]></title>
        <id>https://docs.pryscraper.com/blog/pry-actor-factory</id>
        <link href="https://docs.pryscraper.com/blog/pry-actor-factory"/>
        <updated>2026-08-31T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Pry ships 109 store-ready Apify Actors. Hand-writing 109 actor]]></summary>
        <content type="html"><![CDATA[<p>Pry ships <strong>109 store-ready Apify Actors</strong>. 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
<a href="https://codeberg.org/RugMunchMedia/pryscraper" target="_blank" rel="noopener noreferrer" class="">Actor Factory</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="one-spec-a-complete-actor">One spec, a complete actor<a href="https://docs.pryscraper.com/blog/pry-actor-factory#one-spec-a-complete-actor" class="hash-link" aria-label="Direct link to One spec, a complete actor" title="Direct link to One spec, a complete actor" translate="no">​</a></h2>
<p>An <code>ActorSpec</code> describes <em>what</em> the actor does and <em>how it's priced</em>.
The factory generates everything else:</p>
<div class="language-python codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-python codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">from</span><span class="token plain"> pathlib </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">import</span><span class="token plain"> Path</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">from</span><span class="token plain"> actor_factory </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">import</span><span class="token plain"> ActorSpec</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> PricingEvent</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> generate_actor</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">spec </span><span class="token operator">=</span><span class="token plain"> ActorSpec</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    name</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"price-watcher"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    title</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"Price Watcher"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    description</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"Track e-commerce prices with change detection."</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    version</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"1.0"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    pricing_events</span><span class="token operator">=</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">        PricingEvent</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">            name</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"price-captured"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">            title</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"Price captured"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">            description</span><span class="token operator">=</span><span class="token string" style="color:rgb(255, 121, 198)">"One product price captured."</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">            price_usd</span><span class="token operator">=</span><span class="token number">0.001</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">        </span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">generate_actor</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">spec</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> Path</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">"actors/price-watcher"</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><br></div></code></pre></div></div>
<p>The output is a complete <code>.actor</code> 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.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="ppe-pricing-with-an-economics-model">PPE pricing with an economics model<a href="https://docs.pryscraper.com/blog/pry-actor-factory#ppe-pricing-with-an-economics-model" class="hash-link" aria-label="Direct link to PPE pricing with an economics model" title="Direct link to PPE pricing with an economics model" translate="no">​</a></h2>
<p>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 <a href="https://codeberg.org/RugMunchMedia/pryscraper/src/branch/main/actor_factory/economics.py" target="_blank" rel="noopener noreferrer" class="">economics model</a>
that computes break-even pricing from real inputs — proxy bandwidth,
browser minutes, LLM tokens, and Apify's platform fees — then applies a
margin.</p>
<p>Two synthetic events (<code>apify-actor-start</code>, <code>apify-default-dataset-item</code>)
are billed by the platform automatically; the model accounts for them so
the listed per-item prices stay honest. The result: prices from
<strong>$0.001 to $0.003 per event</strong>, verified against cost, not guessed.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-15-new-market-gap-actors">The 15 new market-gap actors<a href="https://docs.pryscraper.com/blog/pry-actor-factory#the-15-new-market-gap-actors" class="hash-link" aria-label="Direct link to The 15 new market-gap actors" title="Direct link to The 15 new market-gap actors" translate="no">​</a></h2>
<p>The latest batch targets niches with no first-class Apify coverage —
places where demand exists but the store has nothing good:</p>
<ul>
<li class=""><strong>App store ranks</strong> — Apple App Store + Google Play rankings, reviews, ASO signals</li>
<li class=""><strong>AI model pricing</strong> — LLM API price tracking across providers</li>
<li class=""><strong>GPU cloud prices</strong> — GPU instance pricing across cloud providers</li>
<li class=""><strong>EV charging stations</strong> — locations, pricing, availability</li>
<li class=""><strong>Insurance rates</strong> — public quote and rate signals</li>
<li class=""><strong>Ticket resale</strong> — secondary-market event ticket price monitoring</li>
<li class="">…plus market-intel, pricing/rate, and data-pipeline niches</li>
</ul>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="generate-and-publish">Generate and publish<a href="https://docs.pryscraper.com/blog/pry-actor-factory#generate-and-publish" class="hash-link" aria-label="Direct link to Generate and publish" title="Direct link to Generate and publish" translate="no">​</a></h2>
<p>The full loop:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#F8F8F2"><span class="token plain"># 1. Define your spec (see above), then generate</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">python -m actor_factory.cli generate actors/price-watcher</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"># 2. Test locally</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">cd actors/price-watcher &amp;&amp; apify run</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"># 3. Publish to the Apify Store</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">apify push</span><br></div></code></pre></div></div>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="build-your-own">Build your own<a href="https://docs.pryscraper.com/blog/pry-actor-factory#build-your-own" class="hash-link" aria-label="Direct link to Build your own" title="Direct link to Build your own" translate="no">​</a></h2>
<p>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
<a href="mailto:biz@pryscraper.com" target="_blank" rel="noopener noreferrer" class="">email us</a> and we'll add it to the catalog.</p>
<ul>
<li class=""><a class="" href="https://docs.pryscraper.com/docs/apify">Apify Actors docs</a></li>
<li class=""><a href="https://codeberg.org/RugMunchMedia/pryscraper/src/branch/main/actor_factory" target="_blank" rel="noopener noreferrer" class="">Actor Factory source</a></li>
</ul>]]></content>
        <author>
            <name>The Pry Team</name>
            <uri>https://pryscraper.com</uri>
        </author>
        <category label="Engineering" term="Engineering"/>
        <category label="Apify" term="Apify"/>
        <category label="Scraping" term="Scraping"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[x402 Payments — How AI Agents Pay for Scraping]]></title>
        <id>https://docs.pryscraper.com/blog/x402-payments-for-ai-agents</id>
        <link href="https://docs.pryscraper.com/blog/x402-payments-for-ai-agents"/>
        <updated>2026-08-31T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[AI agents increasingly need to fetch web data: prices, listings,]]></summary>
        <content type="html"><![CDATA[<p>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". <strong>x402</strong> solves this by making the HTTP status
code <code>402 Payment Required</code> 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, <em>the payment is the credential</em>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-x402-protocol-in-one-flow">The x402 protocol in one flow<a href="https://docs.pryscraper.com/blog/x402-payments-for-ai-agents#the-x402-protocol-in-one-flow" class="hash-link" aria-label="Direct link to The x402 protocol in one flow" title="Direct link to The x402 protocol in one flow" translate="no">​</a></h2>
<p>x402 (revived by Coinbase's
<a href="https://github.com/coinbase/x402" target="_blank" rel="noopener noreferrer" class="">x402 spec</a>) works like this:</p>
<ol>
<li class="">The agent calls a paid endpoint with no payment.</li>
<li class="">The server responds <code>402 Payment Required</code> with a <code>PAYMENT-REQUIRED</code>
header — a Base64-encoded JSON body containing the receiving wallet,
amount, asset, and facilitator.</li>
<li class="">The agent signs and broadcasts a payment (typically USDC) to that
wallet.</li>
<li class="">The agent submits the transaction to the server, which verifies it
on-chain and returns an access token.</li>
<li class="">The agent replays the token (<code>X-Payment-Id</code> header) until it expires.</li>
</ol>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#F8F8F2"><span class="token plain">curl https://api.pryscraper.com/v1/x402/pricing</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"># {"scrape": {"price_usd": 0.001}, "crawl": {"price_usd": 0.01}, ...}</span><br></div></code></pre></div></div>
<p>Prices are per operation and published at <code>/v1/x402/pricing</code>, so an
agent can budget before it spends: one page costs a tenth of a cent, a
thousand-page bulk crawl costs ten cents.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="eip-3009-the-settlement-primitive">EIP-3009: the settlement primitive<a href="https://docs.pryscraper.com/blog/x402-payments-for-ai-agents#eip-3009-the-settlement-primitive" class="hash-link" aria-label="Direct link to EIP-3009: the settlement primitive" title="Direct link to EIP-3009: the settlement primitive" translate="no">​</a></h2>
<p>On EVM chains, Pry verifies payments via <strong>EIP-3009</strong>
(<code>transferWithAuthorization</code>) — 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.</p>
<p>Verification is real: the transaction is confirmed on-chain before an
access token is issued, with a configurable TTL
(<code>PRY_X402_PAYMENT_TTL</code>, default 3600s).</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="multi-chain-treasuries-evm-solana-tron">Multi-chain treasuries: EVM, Solana, Tron<a href="https://docs.pryscraper.com/blog/x402-payments-for-ai-agents#multi-chain-treasuries-evm-solana-tron" class="hash-link" aria-label="Direct link to Multi-chain treasuries: EVM, Solana, Tron" title="Direct link to Multi-chain treasuries: EVM, Solana, Tron" translate="no">​</a></h2>
<p>A Solana address can't receive an EVM transfer, so Pry keys receiving
wallets by <strong>CAIP-2 network id</strong> — one treasury per chain family:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#F8F8F2"><span class="token plain">PRY_X402_ENABLED=true</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">PRY_X402_WALLET_BASE=0x...        # EVM treasury (shared across EVM chains)</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">PRY_X402_WALLET_SOLANA=...        # distinct base58 address</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">PRY_X402_WALLET_TRON=...          # distinct T-prefix address</span><br></div></code></pre></div></div>
<p>Pry accepts payments across <strong>seven chains</strong>: 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.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-agents-auto-pay-via-mcp">How agents auto-pay via MCP<a href="https://docs.pryscraper.com/blog/x402-payments-for-ai-agents#how-agents-auto-pay-via-mcp" class="hash-link" aria-label="Direct link to How agents auto-pay via MCP" title="Direct link to How agents auto-pay via MCP" translate="no">​</a></h2>
<p>The friction point for agents is <em>implementing</em> the payment flow. Pry
exposes <strong>76 MCP tools</strong>, 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.</p>
<p>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.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="try-it">Try it<a href="https://docs.pryscraper.com/blog/x402-payments-for-ai-agents#try-it" class="hash-link" aria-label="Direct link to Try it" title="Direct link to Try it" translate="no">​</a></h2>
<ul>
<li class=""><a class="" href="https://docs.pryscraper.com/docs/x402/pay-per-call">x402 pay-per-call guide</a> — headers, endpoints, network table</li>
<li class=""><a class="" href="https://docs.pryscraper.com/docs/monetization/pricing">Pricing &amp; monetization</a> — the three lanes</li>
<li class="">Source: <a href="https://codeberg.org/RugMunchMedia/pryscraper" target="_blank" rel="noopener noreferrer" class="">Codeberg</a></li>
</ul>
<p>Commercial licensing and hosted plans: <a href="mailto:biz@pryscraper.com" target="_blank" rel="noopener noreferrer" class="">biz@pryscraper.com</a>.</p>]]></content>
        <author>
            <name>The Pry Team</name>
            <uri>https://pryscraper.com</uri>
        </author>
        <category label="x402" term="x402"/>
        <category label="AI Agents" term="AI Agents"/>
        <category label="Engineering" term="Engineering"/>
    </entry>
</feed>