API Documentation

ZAO Public API

Access current ZAO ecosystem data - events, WaveWarZ battles, and community metrics. Public endpoints, no authentication required.

Overview

The ZAO Public API serves real-time data about the ZAO ecosystem. All endpoints return JSON, support CORS for browser requests, and include standard HTTP cache headers.

The API is designed to power the zao.com website and can be consumed by agents, partner services, and community dashboards.

Response Format

{
  "updatedAt": "2024-07-20T15:30:00Z",
  // ... endpoint-specific data
}

Every response includes an updatedAt ISO 8601 timestamp. Responses are cached for 60 seconds with stale-while-revalidate enabled.

Endpoints

GET/api/public

Get the API directory with a list of all available endpoints.

Example Request

https://thezao.com/api/public

Response Fields

FieldDescription
nameName of the API
descriptionAPI description
endpointsArray of available endpoints
updatedAtISO 8601 timestamp of last update
GET/api/public/events

Get upcoming and recent ZAO events from the community calendar.

Example Request

https://thezao.com/api/public/events

Response Fields

FieldDescription
updatedAtISO 8601 timestamp
upcomingArray of future events (sorted by start time)
recentArray of past events (sorted by start time descending)
event.titleEvent name
event.startEvent start time (ISO 8601)
event.endEvent end time (ISO 8601)
event.urlCalendar event URL
event.locationEvent location (nullable)
GET/api/public/wavewarz

Get current WaveWarZ data: live battle, recent battles, top artists, and songs.

Example Request

https://thezao.com/api/public/wavewarz

Response Fields

FieldDescription
updatedAtISO 8601 timestamp
volumeTotal trading volume (Solana)
solPriceUsdCurrent SOL price in USD
liveBattleCurrently active battle object (nullable)
latestBattlesArray of recent battles (up to 5)
topArtistsArray of top artists (up to 5)
topSongsArray of top songs (up to 5)
GET/api/public/stats

Get ZAO-wide headline stats: aggregated WaveWarZ and event metrics.

Example Request

https://thezao.com/api/public/stats

Response Fields

FieldDescription
updatedAtISO 8601 timestamp
wavewarz.volumeTotal trading volume (Solana)
wavewarz.solPriceUsdCurrent SOL price in USD
wavewarz.activeBattlesNumber of active battles
events.upcomingCountCount of upcoming events

Usage Notes

  • All endpoints support CORS for browser requests.
  • Responses are cached: 60 seconds hard cache + 5 minutes stale-while-revalidate.
  • If upstream data sources are unavailable, endpoints return gracefully with available data and zero/empty values for unavailable fields.
  • The API is versioned at /api/public - future versions may be at /api/v2/public etc.
  • All timestamps are in ISO 8601 format (UTC, marked with Z suffix).