Price Monitoring with a Pay-per-Call Scraping API: $0.008 per Page Check
Track prices on public product pages without a monthly scraping plan. Fetch each page as markdown for $0.008 per successful call, find the price in the text with your own parser, and alert when it changes. Watch 20 pages or 2,000; you pay per check.
- Markdown in, you parse the price
switch402 returns the page text as markdown, not structured price fields. Match the price with a pattern, or hand the markdown to an LLM to read it.
- Pay per check
100 pages checked daily is about 3,000 calls a month, or $24. The same pages checked weekly cost about $3.20 a month.
- Failed checks are free
If no provider returns content you get a 502 and are not charged. Retry on the next run.
- Know the limits
No logins, carts or location-specific prices, and no guarantee that a price loaded only by in-page JavaScript appears in the markdown. Test a few of your target pages first.
Cost: pages x checks per month x $0.008. 50 pages checked daily is about 1,500 calls, roughly $12 a month. Monitor only pages you are allowed to scrape, and follow each site's terms.
Code example
Python: daily price check with change alerts
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact import ExactEvmScheme
client = x402ClientSync()
client.register("eip155:8453", ExactEvmScheme(signer=EthAccountSigner(Account.from_key(os.environ["AGENT_KEY"]))))
session = x402_requests(client)
session.headers["User-Agent"] = "my-agent/1.0"
import json, re, pathlib
WATCH = ["https://example.com/product-1", "https://example.com/product-2"]
STATE = pathlib.Path("prices.json")
PRICE = re.compile(r"\$\s?(\d[\d,]*\.?\d{0,2})")
last = json.loads(STATE.read_text()) if STATE.exists() else {}
for url in WATCH:
r = session.post("https://api.switch402.com/v1/scrape", json={"url": url})
if r.status_code != 200:
continue # 502 = no content, not charged; try again next run
m = PRICE.search(r.json()["markdown"])
price = m.group(1) if m else None
if price and last.get(url) not in (None, price):
print(f"Price changed on {url}: {last[url]} -> {price}")
if price:
last[url] = price
STATE.write_text(json.dumps(last, indent=2))curl: free quote before you schedule a run
curl -s 'https://api.switch402.com/v1/quote?url=https://example.com' -H 'User-Agent: my-agent/1.0'FAQ
- Is switch402 live?
- Yes. POST https://api.switch402.com/v1/scrape with {"url": "..."} returns the page as markdown for $0.008 USDC on Base per call, paid over x402 and charged only on success. The lite tier at /v1/scrape/lite costs $0.003.
- Does switch402 return the price as a field?
- No. It returns url, title and the page as markdown. You find the price in the markdown yourself, with a pattern or an LLM.
- Will it work on every store?
- No. It is for public pages. Prices behind a login, in a cart, by location, or loaded only by in-page JavaScript may be missing. Check a few pages before you rely on it; a failed scrape is not charged.
- What does price monitoring cost with pay per call?
- Pages x checks x $0.008 per standard page, charged only on success, so you pay only for the checks you actually run and quiet weeks cost nothing. The calculators show what a monthly plan's minimum and unused credits would cost you at your volume.