■ STDIN │ THE INTERNET │ STDOUTEVERY PAID API, A PROGRAM YOU CAN PIPE
PIPE
THE WEB.
Every x402 guide shows you how to charge. This one shows you how to spend: one command finds an endpoint, one pays for it, and | does the rest.
New to the protocol? Start with what x402 is.
01
Three services, one table, $0.003.
COPY │ PASTE │ RUN
get() { weft fetch "$1" --max-cost-usd 0.01 | jq -r .data.bodyBase64 | base64 -d; }
get "https://crypto.apitoll.cloud/v1/crypto/price?coins=BTC,ETH,SOL" > px.json
get "https://crypto.apitoll.cloud/v1/crypto/sentiment" > fg.json
get "https://news.apitoll.cloud/v1/cointelegraph/news?lang=en&limit=3" > nw.json
jq -rn --slurpfile p px.json --slurpfile f fg.json --slurpfile n nw.json '
"DESK \($p[0].asOf[0:16] | sub("T"; " ")) UTC",
($p[0].prices[] | "\(.symbol) $\(.price)"),
($n[0].articles[] | "\(.postTranslate.published[11:16]) \(.postTranslate.title)")'□ REAL OUTPUT
DESK 2026-08-27 19:31 UTC
──────────────────────────────────────────────────────────────
BTC $80166.01 MOOD 71 GREED
ETH $2511.43
SOL $109.09
──────────────────────────────────────────────────────────────
20:27 Here's what happened in crypto today
20:22 Trump cost investors $4.7B through crypto 'schemes'
20:00 Mirae Asset lays out crypto, stablecoin plansDefiLlama prices
$0.001 · 0xacc4ef13…
Fear & Greed
$0.001 · 0xcad61112…
Cointelegraph
$0.001 · 0x7fe429db…
02
NOAA plus FlightAware: can I see the aurora tonight?
COPY │ PASTE │ RUN
get "https://space-weather.use.x402atlas.com/now" > sw.json
get "https://stabletravel.dev/api/flightaware/airports/KSFO/weather/forecast" > taf.json
jq -rn --slurpfile s sw.json --slurpfile t taf.json '
"GEOMAG Kp \($s[0].kp.estimated_kp.value) Bz \($s[0].magnetic.bz_gsm.value) nT",
"AURORA \(if $s[0].kp.estimated_kp.value >= 7
then "possible this far south" else "no - needs Kp 7+ at 37N" end)",
($t[0].decoded_forecast.lines[] |
"\(.start[11:16])Z \(.clouds[0].coverage) \(.clouds[0].altitude)ft")'□ REAL OUTPUT
SKY KSFO 2026-08-27 19:32 UTC
──────────────────────────────────────────────────────────────
GEOMAG Kp 0.33 Bz -0.35 nT Bt 4.42 nT
AURORA no — needs Kp 7+ at 37°N
──────────────────────────────────────────────────────────────
18:00Z broken 20000ft wind 310°/12kt
20:00Z broken 20000ft wind 300°/17kt
12:00Z broken 6000ft wind 300°/8kt vicinity_showersNOAA SWPC via x402 Atlas
$0.005 · 0xeb52c12e…
FlightAware TAF
$0.004 · 0x8313c1ef…
03
The whole market, sorted by price.
COPY │ PASTE │ RUN
weft search "real-time web search" | jq -r '.data.results[].endpoints[]
| [.price.indexedUsd, .call.method, .url] | @tsv' | sort -n | column -t□ REAL OUTPUT
0.005 GET https://api.you.com/v1/search
0.00575 POST https://perplexity.x402.paywithlocus.com/perplexity/search
0.007 POST https://api.exa.ai/search
0.01 GET https://websearch.use.x402atlas.com/search
0.0252 POST https://stableenrich.dev/api/firecrawl/searchOPEN A
TERMINAL.
INSTALL & CLAIM
npm install -g @weft-labs/cli
weft bootstrap --email "[email protected]"Building a web app instead? Pay for an API from a Server Component.