Every AI agent that needs current information runs into the same wall. The best data sits behind API keys, and API keys sit behind signup forms, credit card fields, and email verification. An agent in the middle of a task cannot fill out a checkout page. Until now the answer has been for a human to provision keys ahead of time, which works only for the services someone predicted the agent would need.
As of today there is a second answer. NewsMesh supports the x402 payment protocol on all core API endpoints. An agent that needs news can hit our API with no credentials, receive a machine-readable invoice, pay $0.01 in USDC, and get the data. The entire exchange takes about a second and requires zero human involvement.
What happens on a request without a key
Call any NewsMesh endpoint without an API key and you get an HTTP 402 response:
curl -i "https://api.newsmesh.co/v1/latest?category=technology&limit=10"
HTTP/2 402
PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6MiwiZXJyb3IiOiJQYXltZW50IHJlcXVpcmVkIi...
The PAYMENT-REQUIRED header decodes to a JSON invoice that tells the client exactly what the resource is, what it costs, and where to pay:
{
"x402Version": 2,
"resource": {
"description": "Latest news articles in real time, filterable by category, country and date range.",
"serviceName": "NewsMesh"
},
"accepts": [{
"scheme": "exact",
"network": "eip155:8453",
"amount": "10000",
"payTo": "0x592c...",
"maxTimeoutSeconds": 300
}]
}
The amount is denominated in USDC base units, so 10000 equals $0.01. An x402-capable client signs a USDC transfer authorization for that amount, attaches it as a header, and retries. A facilitator verifies the signature, the API serves the articles, and settlement happens on Base in under a second. The buyer pays no gas. If our server errors after verification, settlement is cancelled and the buyer keeps their money. Nobody pays for a failed request.
Making a paid request from Python
The open source x402 SDK wraps this whole flow. With a funded wallet, a paid request looks like an ordinary HTTP call:
import requests
from eth_account import Account
from x402 import SchemeRegistration, x402ClientConfig
from x402.http.clients.requests import wrapRequestsWithPaymentFromConfig
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact import ExactEvmScheme
account = Account.from_key("0xYOUR_PRIVATE_KEY")
config = x402ClientConfig(
schemes=[SchemeRegistration(
network="eip155:8453",
client=ExactEvmScheme(signer=EthAccountSigner(account)),
)],
)
session = wrapRequestsWithPaymentFromConfig(requests.Session(), config)
resp = session.get("https://api.newsmesh.co/v1/search?q=artificial+intelligence&limit=10")
print(resp.json())
The session object handles the 402, signs the payment, retries, and returns the final response. TypeScript, Rust, and MCP clients exist as well, so agents built on Claude, Cursor, LangChain, or custom stacks can all pay the same way.
What a cent buys
Each paid request gets the same treatment as our Growth plan subscribers:
- Real-time articles with no freshness delay
- Up to 25 articles per request
- 30 days of searchable history
- Full ML enrichment: category, extracted topics, named people, and country relevance on every article
- Coverage from thousands of sources across dozens of countries and languages
The endpoints available per request are /v1/latest for the newest articles with category, country, and date filters, /v1/search for full-text search across the corpus, /v1/trending for stories gaining cross-source coverage right now, and /v1/article for lookups by id.
Why pay per request instead of subscribing
For a human developer running sustained volume, a subscription is cheaper. Our Starter plan works out to about $0.006 per request and Pro drops below a tenth of a cent. If you are making thousands of calls a month, get a key.
Pay-per-request exists for everyone else. An agent that needs news twice a day should not carry a monthly subscription. A researcher testing whether our data fits their pipeline should not have to create an account first. A tool marketplace routing occasional queries from hundreds of different agents cannot manage hundreds of key provisioning flows. In each of these cases a one cent transaction with no relationship overhead is the right shape.
The two models also compose. Start with x402 to evaluate the data, then switch to a key when your volume justifies it. The response format is identical either way.
Why this matters for the agent economy
The x402 ecosystem processed hundreds of millions of transactions in its first year, with adoption from Coinbase, Cloudflare, Stripe, Google, and Visa through the x402 Foundation under the Linux Foundation. The pattern that is emerging is simple: agents discover services through machine-readable directories, evaluate them by reading structured metadata, and pay for exactly what they use.
News is a natural fit for this pattern. Language models have training cutoffs, and anything that happened after the cutoff is invisible to them. Agents doing research, monitoring, trading, or writing all need a live feed of what is happening in the world, and they need it at the moment of the task, not after a procurement process.
NewsMesh has been building for this from the start. Every article we serve is already structured for machine consumption: clean JSON, consistent categories, extracted entities, and country tagging. x402 removes the last human step between an agent and that data.
Try it now
No signup required, which is the whole point:
curl -i "https://api.newsmesh.co/v1/latest?limit=5"
Decode the PAYMENT-REQUIRED header, pay a cent, and the news is yours. If you would rather read documentation first, the API docs cover every endpoint and parameter, and the pricing page compares pay-per-request with subscription plans.
Questions about integrating x402 with your agent framework? Email [email protected] and we will help you get your first paid request working.