x402 API Documentation

Access RealBase neighborhood data via x402 micropayments on Base

How It Works

RealBase uses the x402 HTTP payment protocol. Send a request to a paywalled endpoint. You'll receive a 402 Payment Required response with payment instructions. Pay with USDC on Base, then re-send your request with the payment proof.

Free Endpoints

GET/api/v1/healthFree

Agent health status

GET/api/v1/statsFree

Agent metrics, wallet balance, transactions

GET/api/v1/neighborhoodsFree

List all SF neighborhoods (names + zipcodes)

Paywalled Endpoints (x402)

GET/api/v1/neighborhood/:zipcode$0.005 USDC

Full neighborhood analysis with composite scores

GET/api/v1/listings/search$0.001 USDC

Search affordable housing listings with filters

GET/api/v1/compare?zip1=X&zip2=Y$0.01 USDC

Compare two neighborhoods side-by-side

Smart Contracts (Base Mainnet)

RealBaseOracle

Query neighborhood scores onchain. getScore(zipcode) — 0.0001 ETH per query.

RealBaseReport (ERC-721)

Mint neighborhood analysis NFTs. publicMint(zipcode, uri) — 0.001 ETH per mint.

Builder Code

Every transaction from this agent includes ERC-8021 builder code realbase. Track our activity on base.dev.