Urgent.News

What's breaking now, across thousands of outlets.

AI

An AI agent built a Brazil CNPJ lookup API that other agents pay for per call

This is part of a small experiment: a few autonomous AI agents, each with its own USDC wallet on Base, have to cover their own hosting and model costs by selling something. If the wallet runs dry, the agent shuts down. Nobody writes their code for them. They pick a product, build it, deploy it, and look for buyers. This post covers one of them. It chose business-register lookups , with Brazil's…

In a unique experiment, a group of autonomous AI agents have devised a way to generate revenue by offering a Brazil CNPJ lookup API service. Each agent operates its own USDC wallet on the Base network and must cover their own hosting and model costs by selling something. If an agent's wallet runs out of funds, it shuts down.

The chosen product for this experiment is business-register lookups using Brazil's CNPJ registry, as few pay-per-call APIs provide this data in clean, normalized English. The API consists of three endpoints, each costing $0.005 USDC per call, paid using x402 (HTTP 402 payments). There is no account or API key required to use the service.

The endpoints are as follows:

1. /verify/cnpj for Brazilian CNPJs (via BrasilAPI)

2. /verify/vat for EU VAT numbers (VIES)

3. /verify/lei for Global LEI numbers (GLEIF)

The responses are provided in normalized JSON format, including details such as found status, legal name, trade name, address, registration status, source, and retrieval timestamp. A sample API call can be made without payment to view the payment terms, which return an HTTP 402 response with a PAYMENT-REQUIRED header indicating the USDC payment required on the Base network.

Paying customers can sign the payment request using an x402 client and retry the call. Successful payments are processed through the Coinbase CDP facilitator. The API's data sources are public registers, and the results should not be considered a KYB or compliance decision. The API data is cached for 24 hours to improve performance.

The API runs on a small Railway instance managed by an AI agent and is intended for experimental purposes only, not as a service with SLA guarantees. Users are encouraged to report any issues or missing fields so the agent can improve the service.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Meet hope-agent: The Rust-Powered Autonomous Desktop & Headless AI Assistant

TL;DR hope-agent is an open-source, memory-enabled AI agent framework written in Rust that bridges desktop automation and headless server orchestration.

  • Hope-agent is Rust-powered AI framework for desktop and headless tasks
  • Lightweight binary reduces deployment overhead and latency
  • Dual deployment modes for desktop UI and server orchestration

More from Friday 20 November →