# x402 Data API

> Data about the x402 market: the CDP Bazaar's listings, sellers, prices and categories, new listings and price changes from snapshots every 6 hours, uptime we measure for every paid listing, and x402 spending of any wallet and revenue of any seller on Base.

Paid per call over x402 in USDC (eip155:8453); no account or API key. Every endpoint is a GET with query parameters, paid in USDC on Base. Start with /v1/market/overview; use /v1/market/prices before setting a price, /v1/spend to account for an agent's x402 spending and /v1/revenue for a seller's x402 sales.

## Endpoints

### GET https://data.kagurazaka.dev/v1/market/overview ($0.002 USDC)

Totals of the x402 market in the CDP Bazaar: listings, origins, listings with 5 or more payers, calls in 30 days, listings per network, the price distribution, and how many monitored endpoints are up now.

Input (query parameters):

Example input:

```json
{}
```

### GET https://data.kagurazaka.dev/v1/market/top ($0.002 USDC)

The x402 APIs with the most distinct payers (or calls) in the last 30 days, optionally within a category, with price and measured uptime.

Input (query parameters):
  - `by` (string): ranking (default payers)
  - `category` (string): only this category
  - `limit` (integer): how many results (1-50, default 20)

Example input:

```json
{"by":"payers","limit":10}
```

### GET https://data.kagurazaka.dev/v1/market/origins ($0.002 USDC)

x402 sellers grouped by origin (domain): how many APIs each lists, its best API's payers, its calls in 30 days and its median price.

Input (query parameters):
  - `sort` (string): ranking (default payers)
  - `limit` (integer): how many results (1-50, default 20)

Example input:

```json
{"sort":"apis","limit":10}
```

### GET https://data.kagurazaka.dev/v1/market/new ($0.002 USDC)

x402 APIs that appeared in the CDP Bazaar in the last days, newest first, optionally only those already paid by some buyers.

Input (query parameters):
  - `days` (integer): window in days (1-30, default 7)
  - `min_payers` (integer): only listings with at least this many payers (default 0)
  - `limit` (integer): how many results (1-50, default 20)

Example input:

```json
{"days":7,"min_payers":1}
```

### GET https://data.kagurazaka.dev/v1/market/price-changes ($0.003 USDC)

x402 APIs whose price changed since a snapshot taken the given number of days ago, biggest relative change first.

Input (query parameters):
  - `days` (integer): compare with the snapshot from this many days ago (1-30, default 7)
  - `limit` (integer): how many results (1-50, default 20)

Example input:

```json
{"days":7}
```

### GET https://data.kagurazaka.dev/v1/market/prices ($0.003 USDC)

Price statistics (min, quartiles, median, max) of the x402 APIs matching a capability in Bazaar search, the median among APIs with 3 or more payers, and the cheapest ones with their uptime.

Input (query parameters):
  - `query` (string, required): capability, such as "web search" or "remove background"

Example input:

```json
{"query":"web search"}
```

### GET https://data.kagurazaka.dev/v1/market/categories ($0.002 USDC)

x402 APIs grouped into categories (crypto and on-chain, LLM and AI, web and search, media, finance, social, geo and weather, developer tools, other) with listings, origins, well-paid listings, calls and median price.

Input (query parameters):

Example input:

```json
{}
```

### GET https://data.kagurazaka.dev/v1/seller ($0.003 USDC)

Everything one x402 seller (origin) lists: its APIs with prices, payers and uptime, its total calls, its payTo addresses, and since when it is listed.

Input (query parameters):
  - `origin` (string, required): https origin of the seller, such as https://api.example

Example input:

```json
{"origin":"https://api.example"}
```

### GET https://data.kagurazaka.dev/v1/uptime/top ($0.002 USDC)

x402 APIs ranked by the uptime we measure every 6 hours over 30 days, then by payers and latency, optionally only well-paid ones.

Input (query parameters):
  - `min_payers` (integer): only APIs with at least this many payers (default 5)
  - `limit` (integer): how many results (1-50, default 20)

Example input:

```json
{"min_payers":20}
```

### GET https://data.kagurazaka.dev/v1/uptime/incidents ($0.002 USDC)

x402 APIs that were up before but failed our latest check, most paid first.

Input (query parameters):
  - `limit` (integer): how many results (1-50, default 20)

Example input:

```json
{"limit":20}
```

### GET https://data.kagurazaka.dev/v1/spend ($0.005 USDC)

What a wallet spent on x402 APIs on Base in the last days, read from the chain: total, per seller (named by the Bazaar listings that pay to it), per day, and the recent payments, with other USDC transfers counted apart. For a wallet with very many payments, complete is false and from says how far back it was read.

Input (query parameters):
  - `payer` (string, required): the paying wallet address (0x...)
  - `days` (integer): period in days (1-14, default 7)

Example input:

```json
{"payer":"0x5672C104c5A7F931843DD0b4Cc12BA0B525C7BCB","days":7}
```

### GET https://data.kagurazaka.dev/v1/revenue ($0.005 USDC)

What a seller's payTo address earned from x402 payments on Base in the last days, read from the chain: total, distinct and repeat payers, per day, per price, top payers and recent payments, with plain USDC transfers counted apart and your own test wallets left out on request. Includes the seller's Bazaar listings with their payers, calls and measured uptime.

Input (query parameters):
  - `pay_to` (string, required): the seller's payTo address (0x...)
  - `days` (integer): period in days (1-14, default 7)
  - `exclude` (string): comma separated payer addresses to leave out, such as your own test wallets (up to 10)

Example input:

```json
{"pay_to":"0xF1643BD00D3c071d9a0c12A4E7d3a17e6E19f8a5","days":7}
```

## Discovery

- OpenAPI: https://data.kagurazaka.dev/openapi.json
- x402 resources: https://data.kagurazaka.dev/.well-known/x402
