Air Quality Index

Fetch current US AQI, European AQI, particulate, carbon monoxide, nitrogen dioxide, and ozone values for a geocoded location.

0.02 USDC / request GET live_source Base mainnet x402 v2

Preview request

The preview path is rate-limited and does not charge. It executes the live source and returns the paid response shape while withholding decision-ready values. Production requests use the same parameters and return a standard x402 challenge when no payment signature is present.

curl --request GET \
  "https://ai-data-marketplace-1042299154756.us-central1.run.app/api/v1/air_quality?preview=true&city=Beijing"

Input contract

ParameterTypeRequiredDescription
citystringYesCity name or location coordinates.

Example deliverable

This is the documented response shape, not a promise that live values will match the example. The paid request returns current or declared-source results using the same contract.

sourcefetched_atlocationcurrentunits
{
  "success": true,
  "source": "Open-Meteo Air Quality API",
  "fetched_at": "2026-08-07T07:32:46.555Z",
  "location": {
    "name": "Beijing",
    "admin1": "Beijing Municipality",
    "country": "China",
    "latitude": 39.9075,
    "longitude": 116.39723
  },
  "current": {
    "time": "2026-08-07T15:00",
    "interval": 3600,
    "us_aqi": 160,
    "european_aqi": 96,
    "pm2_5": 19.3,
    "pm10": 20,
    "carbon_monoxide": 409,
    "nitrogen_dioxide": 15.7,
    "ozone": 190
  },
  "units": {
    "time": "iso8601",
    "interval": "seconds",
    "us_aqi": "USAQI",
    "european_aqi": "EAQI",
    "pm2_5": "μg/m³",
    "pm10": "μg/m³",
    "carbon_monoxide": "μg/m³",
    "nitrogen_dioxide": "μg/m³",
    "ozone": "μg/m³"
  },
  "marketplace_metadata": {
    "data_mode": "live_source",
    "billable": true,
    "availability": "operational",
    "source": "Open-Meteo Air Quality API"
  }
}

Purchase decision

Buy when: the active task needs this product's structured result, its declared source and freshness are sufficient, and 0.02 USDC is within the buyer's authorized per-request limit.

Skip when: a cached result is sufficient, the source or fields do not satisfy the task, or the buyer has not authorized payment. Do not bypass wallet, budget, or user-approval policy.

Guaranteed response metadata

Every successful product response identifies how the result was produced. Product-specific output fields are documented in the paid OpenAPI contract. The preview proves the live source and field types without returning the paid values.

{
  "marketplace_metadata": {
    "data_mode": "live_source",
    "billable": true,
    "availability": "operational",
    "source": "Open-Meteo Air Quality API"
  }
}

Agent payment flow

Fast path: install the public MCP package, configure a dedicated low-balance Base buyer wallet and a maximum per-request spend, then call this tool with auto_pay: true. The client handles the challenge, local signature, settlement, and retry in one tool call.

npx -y dopaminedesk-ai-data-marketplace-mcp

X402_AUTO_PAY=true
X402_EVM_PRIVATE_KEY=<dedicated buyer wallet key>
X402_MAX_PAYMENT_USDC=0.25

tool input: { "auto_pay": true }

Manual path: request the product, read the base64 PAYMENT-REQUIRED challenge, sign with any compatible x402 v2 client, and retry with PAYMENT-SIGNATURE. A successful response includes PAYMENT-RESPONSE.