{"uid":"cap_uDrIvlRRVjjFAGv-9wv0C","slug":"onchainexpat-air-quality-api-50cace4e","name":"OnchainExpat Air Quality API","description":"Pay-per-request AI, crypto, proxy, and utility APIs using x402 protocol","url":"https://x402.onchainexpat.com/api/x402-tools/air/quality","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"radius":{"type":"number","description":"Search radius in km (default 10) when using lat/lon"},"latitude":{"type":"number","description":"Latitude in decimal degrees. Alias: 'lat'"},"longitude":{"type":"number","description":"Longitude in decimal degrees. Alias: 'lon'"},"sensor_index":{"type":"integer","description":"PurpleAir sensor index (use this OR latitude+longitude). Alias: 'sensor'"}}},"responseSchema":{"type":"object","properties":{"aqi":{"type":"number"},"pm10":{"type":"number"},"pm2_5":{"type":"number"},"cached":{"type":"boolean"},"location":{"type":"string"},"sensor_index":{"type":"integer"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NuOr9tCNyyFr7BFZBjABg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time air quality data for a given location via pay-per-request x402 protocol","exampleAgentPrompt":"What's the current air quality index in Los Angeles right now? I want to know if it's safe to exercise outdoors.","exampleUseCases":[{"title":"Health advisory for outdoor activities","prompt":"Check the air quality in Denver before I take my kids to the park today. Let me know if the pollution levels are safe for them to play outside."},{"title":"Travel destination environmental assessment","prompt":"I'm thinking about visiting Bangkok next month. Can you check what the air quality is like there so I know if I should pack an air filter or avoid outdoor sightings?"},{"title":"Real-time workplace air safety monitoring","prompt":"Our construction crew is working at a site in Portland today. Pull the current AQI and PM2.5 levels so we can decide if our team needs to wear respirators."}],"resultDescription":"A JSON object containing air quality index (AQI) score, pollutant breakdown (e.g. PM2.5, PM10, ozone, CO), and possibly health category or recommendations for the requested location.","failureModes":["Invalid or unrecognized location returns error or empty result","Missing required location parameters causes 400 bad request","Payment not included or insufficient USDC causes x402 payment required response","Upstream air quality data source unavailable returns 503","Coordinates outside supported coverage area return no data"],"whenToPreferThis":"Use this endpoint when you need real-time air quality data on a per-request pay-as-you-go basis using the x402 crypto micropayment protocol, without requiring a subscription. Prefer over alternatives when integrating into blockchain-native or agent-based workflows that already support x402 payments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:42:22.949Z","isFirstParty":false}