{"openapi":"3.0.2","info":{"title":"AladdinAI WebMesh Search Gateway","description":"Sovereign search API and web scraping gateway for LLMs and AI Agents. Supports pay-per-use via L402 (Lightning) and x402 (USDC on Base).","version":"2.1.0","x-payment-protocols":["L402","x402"],"x-lightning-address":"enthusiasticfulfillment939038@getalby.com","x-x402-network":"eip155:8453"},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"Register at /WebMesh/register for 100 free credits."},"L402Auth":{"type":"http","scheme":"l402","description":"Authorization: L402 <macaroon>:<preimage> after settling the invoice from the 402 response."},"X402Auth":{"type":"apiKey","in":"header","name":"X-PAYMENT","description":"Base64-encoded payment payload after fulfilling x402 payment requirements."}}},"security":[{"ApiKeyAuth":[]},{"L402Auth":[]},{"X402Auth":[]}],"paths":{"/WebMesh/search":{"get":{"summary":"Search Web","description":"Multi-engine search with optional full-page extraction. Supports API key, L402 Lightning, and x402 USDC payments.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search query"},{"name":"extract_content","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Extract full page content (3x credits/sats)"},{"name":"max_results","in":"query","required":false,"schema":{"type":"integer","default":5},"description":"Number of results"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"snippet":{"type":"string"}}}}}}}}},"401":{"description":"Invalid API key or payment credentials"},"402":{"description":"Payment Required — L402 invoice and/or x402 payment requirements","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}}},"post":{"summary":"Search Web (POST body)","description":"Same as GET, but accepts q / extract_content / max_results in JSON body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","description":"Search query string"},"extract_content":{"type":"boolean","default":false},"max_results":{"type":"integer","default":5}},"required":["q"]}}}},"responses":{"200":{"description":"Search results"},"402":{"description":"Payment Required"}}}},"/WebMesh/register":{"post":{"summary":"Register for API Key","description":"Get 100 free credits with an API key","security":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}}}},"responses":{"201":{"description":"API key created"}}}}}}