How AI agents can check prices in another country
Online prices are not the same everywhere. The same product page can show a different price, currency, shipping option or "not available in your region" message depending on where the visitor is. An AI agent running in a US data center only ever sees the US version.
Geo402 fixes that: your agent reads the page through a residential IP in the country you choose, and gets the result back as clean markdown it can reason about.
One call
GET https://geo402.com/api/fetch?url=https://shop.example.com/product/123&country=de
The first response is 402 Payment Required with the price ($0.005). Your x402 client pays automatically and retries, and you get:
{
"final_url": "https://shop.example.com/de/product/123",
"country": "de",
"status": 200,
"title": "Produkt 123 | Example Shop",
"content": "# Produkt 123\n\n**49,99 €** inkl. MwSt.\n\nLieferung in 2-3 Werktagen ...",
"truncated": false
}
Notice the final_url: many shops redirect visitors to a country version. Geo402 follows those redirects (and re-checks each one against the rules).
In code
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const pay = wrapFetchWithPayment(fetch,
new x402Client().register("eip155:*", new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY))));
async function pageFrom(url, country) {
const r = await pay(`https://geo402.com/api/fetch?url=${encodeURIComponent(url)}&country=${country}`);
return r.json();
}
const de = await pageFrom("https://shop.example.com/product/123", "de");
console.log(de.content); // give this to your model: "What is the price and currency?"
Fund the agent's wallet with a few dollars of USDC on Base. At $0.005 a page, $1 covers about 200 pages.
Tips that save money
- Ask for markdown (the default). It strips scripts, styles and navigation, so your model reads less and understands more.
- Check first for free if you're unsure a site is allowed:
GET https://geo402.com/api/fetch/check?url=...&country=de. - You only pay for pages that load. If a site blocks the request or shows a CAPTCHA, you get HTTP 424 and are not charged.
What to expect from big retailers
Some large retailers protect their pages against all automated visitors, whatever the IP. Geo402 does not solve CAPTCHAs or bypass bot protection, so those pages return 424 (not charged). For Amazon specifically, use ASIN402, which returns structured Amazon prices and price history for 11 marketplaces without scraping the page.